From 88db9b611c0545ee0ebb41e99ea4274d14a32af4 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 3 Sep 2023 13:14:44 +0200 Subject: [PATCH] Added kwargs to `ds_get` to be passed to panda's read_csv. --- pydomo/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pydomo/__init__.py b/pydomo/__init__.py index a3ccf1b..39a45fa 100644 --- a/pydomo/__init__.py +++ b/pydomo/__init__.py @@ -112,7 +112,7 @@ def ds_meta(self, dataset_id): def ds_delete(self, dataset_id, prompt_before_delete=True): """ Delete a DataSet naming convention equivalent with rdomo - + :Parameters: - `dataset_id`: id of a dataset (str) """ @@ -176,7 +176,7 @@ def ds_query(self, dataset_id, query, return_data=True): return output - def ds_get(self, dataset_id): + def ds_get(self, dataset_id, **kwargs): """ Export data to pandas Dataframe @@ -185,6 +185,8 @@ def ds_get(self, dataset_id): :Parameters: - `dataset_id`: id of a dataset (str) + - `**kwargs`: additional keyword arguments to be passed to read_csv + :Returns: pandas dataframe @@ -192,7 +194,7 @@ def ds_get(self, dataset_id): csv_download = self.datasets.data_export(dataset_id, include_csv_header=True) content = StringIO(csv_download) - df = read_csv(content) + df = read_csv(content, **kwargs) # Convert to dates or datetimes if possible for col in df.columns: