MAINT: make vega_datasets an optional requirement
The functions here are merely thin wrappers for data access routines in the
vega_datasets package.
"""
-from vega_datasets import data
-
def load_dataset(name):
"""Load a dataset by name as a pandas.DataFrame."""
- return data(name)
+ import vega_datasets
+ return vega_datasets.data(name)
def list_datasets():
"""List the available datasets."""
- return data.list_datasets()
+ import vega_datasets
+ return vega_datasets.data.list_datasets()
