excel dataset

This commit is contained in:
Xi Yan 2024-10-07 21:56:13 -07:00
parent 5b7d24b1c3
commit a56ea48d71
2 changed files with 16 additions and 3 deletions

View file

@ -33,7 +33,12 @@ class CustomDataset(BaseDataset):
def load(self):
if self.dataset:
return
df = pandas.read_csv(self.url)
# TODO: better support w/ data url
if self.url.endswith(".csv"):
df = pandas.read_csv(self.url)
elif self.url.endswith(".xlsx"):
df = pandas.read_excel(self.url)
self.dataset = Dataset.from_pandas(df)