Skip to content

Commit

Permalink
Show jfk_schema_dict in the Dataset example (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhdev authored Jul 13, 2021
1 parent 278d751 commit 6d1ee5f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pydax/_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,19 @@ class Dataset:
Example:
>>> from tempfile import TemporaryDirectory
>>> import pprint
>>> import pydax
>>> dataset_schemata = pydax.schema.DatasetSchemaCollection('./tests/schemata/datasets.yaml')
>>> jfk_schema_dict = dataset_schemata.export_schema('datasets', 'noaa_jfk', '1.1.4')
>>> pprint.pprint(jfk_schema_dict)
{'description': ...
'download_url': '...noaa-weather-data-jfk-airport.tar.gz',
...
'subdatasets': {'jfk_weather_cleaned': {...
'format': {'id': 'table/csv',
...}},
...
'path': 'noaa-weather-data-jfk-airport/jfk_weather_cleaned.csv'}}}
>>> jfk_data_dir = TemporaryDirectory()
>>> jfk_dataset = Dataset(schema=jfk_schema_dict, data_dir=jfk_data_dir.name)
>>> jfk_dataset.download()
Expand Down

0 comments on commit 6d1ee5f

Please sign in to comment.