load_dataset
load_dataset(name='m4_daily', verbose=False, engine='pandas', **kwargs)
Load one of 12 Time Series Datasets.
The load_dataset
function is used to load various time series datasets by name, with options to print the available datasets and pass additional arguments to pandas.read_csv
. The available datasets are:
m4_hourly
: The M4 hourly datasetm4_daily
: The M4 daily datasetm4_weekly
: The M4 weekly datasetm4_monthly
: The M4 monthly datasetm4_quarterly
: The M4 quarterly datasetm4_yearly
: The M4 yearly datasetbike_sharing_daily
: The bike sharing daily datasetbike_sales_sample
: The bike sales sample datasettaylor_30_min
: The Taylor 30 minute datasetwalmart_sales_weekly
: The Walmart sales weekly datasetwikipedia_traffic_daily
: The Wikipedia traffic daily datasetstocks_daily
: The MAANNG stocks datasetexpedia
: Expedia Hotel Time Series Dataset
The datasets can be loaded with load_dataset(name)
, where name
is the name of the dataset that you want to load. The default value is set to “m4_daily”, which is the M4 daily dataset. However, you can choose from a list of available datasets mentioned above.
Parameters
Name | Type | Description | Default |
---|---|---|---|
name |
str | The name parameter is used to specify the name of the dataset that you want to load. The default value is set to “m4_daily”, which is the M4 daily dataset. However, you can choose from a list of available datasets mentioned in the function’s docstring. |
'm4_daily' |
verbose |
bool | The verbose parameter is a boolean flag that determines whether or not to print the names of the available datasets. If verbose is set to True , the function will print the names of the available datasets. If verbose is set to False , the function will not print anything. |
False |
engine |
str | The engine parameter is used to specify the engine to use for reading the csv file. The default value is set to “pandas”, which uses pandas to read the csv file. If engine is set to “polars”, the function will use polars to read the csv file and convert it to a pandas DataFrame. |
'pandas' |
**kwargs |
The **kwargs parameter is used to pass additional arguments to pandas.read_csv . |
{} |
Returns
Type | Description |
---|---|
pd.DataFrame | The load_dataset function returns the requested dataset as a pandas DataFrame. |
Examples
# Load the M4 daily dataset using pandas
= load_dataset('m4_daily')
df
df
# Load the M4 daily dataset using polars
= load_dataset('m4_daily', engine='polars')
df
df