Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pydomo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
"""
Expand Down Expand Up @@ -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

Expand All @@ -185,14 +185,16 @@ 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
"""
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:
Expand Down