Skip to content

Commit

Permalink
chore(datasets): Fix pandas.GenericDataset doctest (#445)
Browse files Browse the repository at this point in the history
Fix pandas.GenericDataset doctest

Signed-off-by: Merel Theisen <[email protected]>
  • Loading branch information
merelcht authored Nov 27, 2023
1 parent 6d38a2e commit 19a549e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ dataset-doctests:
--ignore kedro_datasets/matplotlib/matplotlib_writer.py \
--ignore kedro_datasets/pandas/deltatable_dataset.py \
--ignore kedro_datasets/pandas/gbq_dataset.py \
--ignore kedro_datasets/pandas/generic_dataset.py \
--ignore kedro_datasets/pandas/sql_dataset.py \
--ignore kedro_datasets/partitions/incremental_dataset.py \
--ignore kedro_datasets/partitions/partitioned_dataset.py \
Expand Down
4 changes: 3 additions & 1 deletion kedro-datasets/kedro_datasets/pandas/generic_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ class GenericDataset(AbstractVersionedDataset[pd.DataFrame, pd.DataFrame]):
>>>
>>> data = pd.DataFrame({"col1": [1, 2], "col2": [4, 5], "col3": [5, 6]})
>>>
>>> dataset = GenericDataset(filepath="test.csv", file_format="csv")
>>> dataset = GenericDataset(
... filepath="test.csv", file_format="csv", save_args={"index": False}
... )
>>> dataset.save(data)
>>> reloaded = dataset.load()
>>> assert data.equals(reloaded)
Expand Down

0 comments on commit 19a549e

Please sign in to comment.