Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Fix example in 06_jupyter-notebook-workflow #5

Merged
merged 2 commits into from
Oct 29, 2020

Conversation

josephhaaga
Copy link
Contributor

Fixes context.catalog.save() example in docs/06_jupyter-notebook-workflow.md.

Looks like the example passes a dict, but pandas.JSONDataSet expects a pandas.DataFrame

Steps to reproduce

my_dict = {"key1": "some_value", "key2": None}
context.catalog.save("my_dataset", my_dict)

Expected

# no errors, dataset saves successfully

Actual

DataSetError: Failed while saving data to data set JSONDataSet(filepath=/Users/josephhaaga/Documents/tmp/testing/data/01_raw/my_dataset.json, load_args={}, protocol=file, save_args={}).
'dict' object has no attribute 'to_json'

Copy link
Contributor

@yetudada yetudada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

Copy link
Contributor

@lorenabalan lorenabalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch thank you!!

@lorenabalan lorenabalan merged commit eddd759 into kedro-org:master Oct 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants