> ## Documentation Index
> Fetch the complete documentation index at: https://nixtlaverse.nixtla.io/llms.txt
> Use this file to discover all available pages before exploring further.

# M3

> M3 dataset

##

### `Other`

```python theme={null}
Other(seasonality=1, horizon=8, freq='D', name='Other', n_ts=174, source_url='https://zenodo.org/api/records/4656335/files/m3_other_dataset.zip/content', file_name='m3_other_dataset')
```

### `Monthly`

```python theme={null}
Monthly(seasonality=12, horizon=18, freq='ME', name='Monthly', n_ts=1428, source_url='https://zenodo.org/api/records/4656298/files/m3_monthly_dataset.zip/content', file_name='m3_monthly_dataset')
```

### `Quarterly`

```python theme={null}
Quarterly(seasonality=4, horizon=8, freq='QE', name='Quarterly', n_ts=756, source_url='https://zenodo.org/api/records/4656262/files/m3_quarterly_dataset.zip/content', file_name='m3_quarterly_dataset')
```

### `Yearly`

```python theme={null}
Yearly(seasonality=1, horizon=6, freq='YE', name='Yearly', n_ts=645, source_url='https://zenodo.org/api/records/4656222/files/m3_yearly_dataset.zip/content', file_name='m3_yearly_dataset')
```

### `M3`

```python theme={null}
M3()
```

#### `M3.download`

```python theme={null}
download(directory, class_group)
```

Download M3 Dataset.

**Parameters:**

| Name          | Type                     | Description                                | Default    |
| ------------- | ------------------------ | ------------------------------------------ | ---------- |
| `directory`   | <code>[str](#str)</code> | Directory path to download dataset.        | *required* |
| `class_group` |                          | Dataclass with source\_url and file\_name. | *required* |

#### `M3.load`

```python theme={null}
load(directory, group)
```

Downloads and loads M3 data.

**Parameters:**

| Name        | Type                     | Description                                                            | Default    |
| ----------- | ------------------------ | ---------------------------------------------------------------------- | ---------- |
| `directory` | <code>[str](#str)</code> | Directory where data will be downloaded.                               | *required* |
| `group`     | <code>[str](#str)</code> | Group name. Allowed groups: 'Yearly', 'Quarterly', 'Monthly', 'Other'. | *required* |

**Returns:**

| Type                                                                                                                                                                                               | Description                                                               |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| <code>[Tuple](#typing.Tuple)\[[DataFrame](#pandas.DataFrame), [Optional](#typing.Optional)\[[DataFrame](#pandas.DataFrame)], [Optional](#typing.Optional)\[[DataFrame](#pandas.DataFrame)]]</code> | pd.DataFrame: Target time series with columns \['unique\_id', 'ds', 'y']. |
