# Python time-series libraries

Python time series libraries store, transform, and analyze observations indexed by time. Analysis libraries add seasonal decomposition, change point detection, and automatic feature extraction on top of time-indexed tables. These libraries let analysts, monitoring tools, and AI agents find trends and changes in metrics and sensor data.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [pandas](#pandas) | 706.0M | 49.6K | Nov 2026 | BSD-3-Clause |
| [Statsmodels](#statsmodels) | 40.4M | 11.8K | Aug 2026 | BSD-3-Clause |
| [Prophet](#prophet) | 4.1M | 20.5K | Oct 2026 | MIT |
| [ruptures](#ruptures) | 1.3M | 2.1K | Sep 2025 | BSD-2-Clause |
| [ARCH](#arch) | 1.1M | 1.7K | Nov 2026 | NCSA |
| [sktime](#sktime) | 678.5K | 10.1K | Nov 2026 | BSD-3-Clause |
| [STUMPY](#stumpy) | 292.1K | 4.2K | Feb 2026 | BSD-3-Clause |
| [tsfresh](#tsfresh) | 189.2K | 9.5K | May 2026 | MIT |

Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[pandas](#pandas) has the most monthly downloads in this comparison, at 706.0M, a count that covers all its data analysis work.

## Capabilities

| Library | Native forecasting estimators | Regime or change-point models |
| --- | --- | --- |
| [pandas](#pandas) | No | No |
| [Statsmodels](#statsmodels) | Yes | Yes |
| [Prophet](#prophet) | Yes | Yes |
| [ruptures](#ruptures) | No | Yes |
| [ARCH](#arch) | Yes | No |
| [sktime](#sktime) | Yes | Yes |
| [STUMPY](#stumpy) | No | Yes |
| [tsfresh](#tsfresh) | No | No |

## Libraries

### pandas

[GitHub](https://github.com/pandas-dev/pandas) · [PyPI](https://pypi.org/project/pandas) · [Docs](https://pandas.pydata.org/docs/)

Provides time-indexed data structures, frequency conversion, and resampling.

- Downloads / mo: 706.0M
- Stars: 49.6K
- Last release: 3.1.1
- License: BSD-3-Clause
- Capabilities: [From the pandas docs](https://pandas.pydata.org/docs/)

**Strengths**

- **Resamples timestamped observations.** Use resample to group a time series into another frequency.
- **Adds custom rolling calculations.** Apply a custom aggregation function to each rolling window.

**Watch out for**

- **Clock changes need explicit handling.** Set nonexistent when localizing timestamps that fall inside a skipped hour.
- **Numba windows need array inputs.** Use raw=True with the Numba rolling engine instead of Series-only attributes.

```sh
pip install pandas
```

**freqtrade/freqtrade** (56.9K stars)

[freqtrade/freqtrade](https://github.com/freqtrade/freqtrade) 

```python
def ohlcv_fill_up_missing_data(
    dataframe: DataFrame,
    timeframe: str,
    pair: str,
    candle_type: CandleType = CandleType.SPOT,
) -> DataFrame:
    """
    Fills up missing data with 0 volume rows,
    using the previous close as price for "open", "high", "low" and "close", volume is set to 0

    Candle types that carry a single value (e.g. funding rates) have no candle to fabricate -
    inventing one would silently make up rates - so they are returned unchanged.
    """
    if not candle_type_is_ohlcv(candle_type):
        logger.debug(f"Skipping fillup for {pair}, {timeframe} - not applicable to {candle_type}.")
        return dataframe

    from freqtrade.exchange import timeframe_to_resample_freq

    ohlcv_dict = {"open": "first", "high": "max", "low": "min", "close": "last", "volume": "sum"}
    resample_interval = timeframe_to_resample_freq(timeframe)
    # Resample to create "NAN" values
    df = dataframe.resample(resample_interval, on="date").agg(ohlcv_dict)

    # Forwardfill close for missing columns
    df["close"] = df["close"].ffill()
    # Use close for "open, high, low"
    df.loc[:, ["open", "high", "low"]] = df[["open", "high", "low"]].fillna(
        value={
            "open": df["close"],
            "high": df["close"],
            "low": df["close"],
        }
    )
    df = df.reset_index()
    len_before = len(dataframe)
    len_after = len(df)
    pct_missing = (len_after - len_before) / len_before if len_before > 0 else 0
    if len_before != len_after:
        message = (
            f"Missing data fillup for {pair}, {timeframe}: "
            f"before: {len_before} - after: {len_after} - {pct_missing:.2%}"
        )
        if pct_missing > 0.01:
            logger.info(message)
        else:
            # Don't be verbose if only a small amount is missing
            logger.debug(message)
    return df

```

[freqtrade/data/converter/converter.py](https://github.com/freqtrade/freqtrade/blob/b6d30da09b6745065bf60d464286ebb1b889ccbe/freqtrade/data/converter/converter.py#L128-L176) · [More projects using pandas →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20pandas%20for%20time-series%20analysis&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import pandas as pd

index = pd.date_range('2026-01-01', periods=4, freq='h', tz='UTC')
series = pd.Series([1.0, 3.0, 5.0, 7.0], index=index)
print(series.resample('2h').mean())

```

From [timeseries.rst](https://pandas.pydata.org/docs/user_guide/timeseries.html)

### Statsmodels

[GitHub](https://github.com/statsmodels/statsmodels) · [PyPI](https://pypi.org/project/statsmodels) · [Docs](https://www.statsmodels.org/stable/)

Provides statistical methods for modeling and analyzing related time series.

- Downloads / mo: 40.4M
- Stars: 11.8K
- Last release: 0.15.0
- License: BSD-3-Clause
- Capabilities: [From the Statsmodels docs](https://www.statsmodels.org/stable/)

**Strengths**

- **Separates seasonal components.** Return trend, seasonal, and residual components with seasonal_decompose.
- **Models related series together.** Use VAR to estimate relationships between series and their lagged values.

**Watch out for**

- **VAR expects stationary series.** Transform trending series before fitting a standard stable VAR model.
- **Classical decomposition needs complete cycles.** Provide complete seasonal cycles before calling seasonal_decompose.

```sh
pip install statsmodels
```

**unit8co/darts** (9.6K stars)

[unit8co/darts](https://github.com/unit8co/darts) 

```python
def extract_trend_and_seasonality(
    ts: TimeSeries,
    freq: int | Sequence[int] | None = None,
    model: Literal["additive", "multiplicative"] = MULTIPLICATIVE,
    method: str = "naive",
    return_residual: bool = False,
    **kwargs,
) -> tuple[TimeSeries, TimeSeries] | tuple[TimeSeries, TimeSeries, TimeSeries]:
    """
    Extracts trend, seasonality and residual from a TimeSeries instance using `statsmodels.tsa`.

    Parameters
    ----------
    ts
        The series to decompose
    freq
        The seasonality period to use.
    model
        The type of decomposition to use: ``"additive"`` or ``"multiplicative"``. Defaults to ``"multiplicative"``.
    method
        The method to be used to decompose the series.
        - "naive" : Seasonal decomposition using moving averages [1]_.
        - "STL" : Season-Trend decomposition using LOESS [2]_. Only compatible with ``ADDITIVE`` model type.
        - "MSTL" : Season-Trend decomposition using LOESS with multiple seasonalities [3]_.
        Only compatible with ``ADDITIVE`` model type.
    return_residual
        If ``False`` (default), return only the trend and seasonal parts. If ``True``, also return the residual
        part as a third time series.
    kwargs
        Other keyword arguments are passed down to the decomposition method.

    Returns
    -------
    Tuple[TimeSeries, TimeSeries] | Tuple[TimeSeries, TimeSeries, TimeSeries]
        A tuple ``(trend, seasonal)`` when ``return_residual=False``, otherwise
        ``(trend, seasonal, residual)``.

    References
    ----------
    .. [1] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.seasonal_decompose.html
    .. [2] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.STL.html
    .. [3] https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.MSTL.html
    """
    model = validate_mode(model, param="model", allowed={ADDITIVE, MULTIPLICATIVE})

    if isinstance(freq, Sequence) and method != "MSTL":
        raise_log(
            ValueError(
                f"{method} decomposition cannot be performed with more than one seasonality, received {freq}."
            ),
        )

    values = ts.to_series(copy=False)
    if np.isnan(values).any():
        raise_log(ValueError("`ts` must not contain missing values."))

    if method == "naive":
        decomp = seasonal_decompose(
            values, period=freq, model=model, extrapolate_trend="period"
        )
    elif method == "STL":
        if model != ADDITIVE:
            raise_log(
                ValueError(
                    f"Only ADDITIVE model is compatible with the STL method. Current model is {model}."
                ),
            )
        decomp = STL(endog=values, period=freq, **kwargs).fit()
    elif method == "MSTL":
        if model != ADDITIVE:
            raise_log(
                ValueError(
                    f"Only ADDITIVE model is compatible with the MSTL method. Current model is {model}."
                ),
            )
        decomp = MSTL(endog=values, periods=freq, **kwargs).fit()
    else:
        raise_log(ValueError(f"Unknown value for `method`: {method}."))

    # keep components, ... only if the number of components matches
    season_shape = decomp.seasonal.shape
    if len(season_shape) == 1:
        season_shape = (season_shape[0], 1)
    if season_shape[1] == ts.n_components:
        components = ts.components
        static_covariates = ts.static_covariates
        hierarchy = ts.hierarchy
    else:
        components = None
        static_covariates = None
        hierarchy = None

    season = TimeSeries(
        times=ts.time_index,
        values=decomp.seasonal,
        components=components,
        static_covariates=static_covariates,
        hierarchy=hierarchy,
        metadata=ts.metadata,
        copy=False,
    )
    trend = TimeSeries(
        times=ts.time_index,
        values=decomp.trend,
        components=ts.components,
        copy=False,
        **ts._attrs,
    )
    if not return_residual:
        return trend, season

    residual = TimeSeries(
        times=ts.time_index,
        values=decomp.resid,
        components=ts.components,
        copy=False,
        **ts._attrs,
    )
    return trend, season, residual

```

[darts/utils/statistics.py](https://github.com/unit8co/darts/blob/f33f30239c358c877f6bdabce7c0aa33ba4202cf/darts/utils/statistics.py#L163-L281) · [More projects using Statsmodels →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20statsmodels%20for%20time-series%20analysis&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
from statsmodels.tsa.seasonal import seasonal_decompose

result = seasonal_decompose([1.0, 2.0, 3.0, 4.0] * 3, period=4)
print(result.trend, result.seasonal, result.resid)

```

From [vector_ar.html](https://www.statsmodels.org/stable/generated/statsmodels.tsa.seasonal.seasonal_decompose.html)

### Prophet

[GitHub](https://github.com/meta/prophet) · [PyPI](https://pypi.org/project/prophet) · [Docs](https://facebook.github.io/prophet/)

Runs an automatic forecasting procedure.

- Downloads / mo: 4.1M
- Stars: 20.5K
- Last release: 1.5.0
- License: MIT
- Capabilities: [From the Prophet docs](https://facebook.github.io/prophet/)

```sh
pip install prophet
```

**apache/superset** (75.5K stars)

[apache/superset](https://github.com/apache/superset) 

```python
def _prophet_fit_and_predict(  # pylint: disable=too-many-arguments
    df: DataFrame,
    confidence_interval: float,
    yearly_seasonality: Union[bool, str, int],
    weekly_seasonality: Union[bool, str, int],
    daily_seasonality: Union[bool, str, int],
    periods: int,
    freq: str,
) -> DataFrame:
    """
    Fit a prophet model and return a DataFrame with predicted results.
    """
    try:
        # `prophet` complains about `plotly` not being installed
        with suppress_logging("prophet.plot"):
            # pylint: disable=import-outside-toplevel
            from prophet import Prophet

        prophet_logger = logging.getLogger("prophet.plot")
        prophet_logger.setLevel(logging.CRITICAL)
        prophet_logger.setLevel(logging.NOTSET)
    except ModuleNotFoundError as ex:
        raise InvalidPostProcessingError(_("`prophet` package not installed")) from ex
    model = Prophet(
        interval_width=confidence_interval,
        yearly_seasonality=yearly_seasonality,
        weekly_seasonality=weekly_seasonality,
        daily_seasonality=daily_seasonality,
    )
    if df["ds"].dt.tz:
        df["ds"] = df["ds"].dt.tz_convert(None)
    try:
        model.fit(df)
        future = model.make_future_dataframe(periods=periods, freq=freq)
        forecast = model.predict(future)[["ds", "yhat", "yhat_lower", "yhat_upper"]]
    except Exception as ex:  # noqa: BLE001
        raise InvalidPostProcessingError(
            _(
                "Unable to generate forecast: %(error)s",
                error=str(ex),
            )
        ) from ex
    return forecast.join(df.set_index("ds"), on="ds").set_index(["ds"])

```

[superset/utils/pandas_postprocessing/prophet.py](https://github.com/apache/superset/blob/18430a95f7da90dd848bc4ed988db58dd8c3362d/superset/utils/pandas_postprocessing/prophet.py#L43-L85) · [More projects using Prophet →](https://dashboard.exa.ai/playground/search?q=prophet%20GitHub%20projects)

**Quickstart**

```python
# Python
import pandas as pd
from prophet import Prophet

# Python
df = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv')
df.head()

# Python
m = Prophet()
m.fit(df)

```

From [quick_start.html](https://github.com/meta/prophet/blob/f57c4e13a29d18f927f2516f04990a3540711694/docs/_docs/quick_start.md)

### ruptures

[GitHub](https://github.com/deepcharles/ruptures) · [PyPI](https://pypi.org/project/ruptures) · [Docs](https://centre-borelli.github.io/ruptures-docs/code-reference/detection/binseg-reference/)

Detects change points and segments non-stationary signals offline.

- Downloads / mo: 1.3M
- Stars: 2.1K
- Last release: 1.1.10
- License: BSD-2-Clause
- Capabilities: [From the ruptures docs](https://centre-borelli.github.io/ruptures-docs/code-reference/detection/binseg-reference/)

**Strengths**

- **Detects changes in signal regimes.** Use the consistent estimator interface to segment non-stationary signals.
- **Accepts custom change costs.** Subclass BaseCost to define the kind of change being detected.

**Watch out for**

- **Works on offline signals.** Use another approach when change detection must update continuously.
- **Candidate spacing changes the search.** Set jump to control which sample positions are considered.

```sh
pip install ruptures
```

**aeon-toolkit/aeon** (1.5K stars)

[aeon-toolkit/aeon](https://github.com/aeon-toolkit/aeon) 

```python
def _run_binseg(self, X):
    import ruptures as rpt

    binseg = rpt.Binseg(
        model=self.model, min_size=self.min_size, jump=self.jump
    ).fit(X)
    found_cps = np.array(binseg.predict(n_bkps=self.n_cps)[:-1], dtype=np.int64)

    return found_cps

```

[aeon/segmentation/_binseg.py](https://github.com/aeon-toolkit/aeon/blob/6d5ef3cdf463e08bafc6d95314c23323c7a1d468/aeon/segmentation/_binseg.py#L96-L104) · [More projects using ruptures →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20ruptures%20for%20time-series%20analysis&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import numpy as np
import ruptures as rpt

signal = np.r_[np.zeros(20), np.ones(20)]
model = rpt.Binseg(model='l2').fit(signal)
breakpoints = model.predict(n_bkps=1)
print(breakpoints)

```

From [binseg-reference.md](https://centre-borelli.github.io/ruptures-docs/code-reference/detection/binseg-reference/)

### ARCH

[GitHub](https://github.com/bashtage/arch) · [PyPI](https://pypi.org/project/arch) · [Docs](https://bashtage.github.io/arch/univariate/introduction.html)

Implements ARCH models in Python.

- Downloads / mo: 1.1M
- Stars: 1.7K
- Last release: 9.0.0
- License: NCSA
- Capabilities: [From the ARCH docs](https://bashtage.github.io/arch/univariate/introduction.html)

```sh
pip install arch
```

**dcajasn/Riskfolio-Lib** (4.6K stars)

[dcajasn/Riskfolio-Lib](https://github.com/dcajasn/Riskfolio-Lib) 

```python
def bootstrapping(
    X,
    kind="stationary",
    q=0.05,
    n_sim=6000,
    window=3,
    diag=False,
    threshold=1e-15,
    seed=0,
):
    r"""
    Estimates the uncertainty sets of mean and covariance matrix through the selected
    bootstrapping method.

    Parameters
    ----------
    X : DataFrame of shape (n_samples, n_assets)
        Assets returns DataFrame, where n_samples is the number of
        observations and n_assets is the number of assets.
    kind : str, optional
        The bootstrapping method. The default value is 'stationary'. Possible values are:

        - 'stationary': stationary bootstrapping method, see `StationaryBootstrap <https://bashtage.github.io/arch/bootstrap/generated/arch.bootstrap.StationaryBootstrap.html#arch.bootstrap.StationaryBootstrap>`_ for more details.
        - 'circular': circular bootstrapping method, see `CircularBlockBootstrap <https://bashtage.github.io/arch/bootstrap/generated/arch.bootstrap.CircularBlockBootstrap.html#arch.bootstrap.CircularBlockBootstrap>`_ for more details.
        - 'moving': moving bootstrapping method, see `MovingBlockBootstrap <https://bashtage.github.io/arch/bootstrap/generated/arch.bootstrap.MovingBlockBootstrap.html#arch.bootstrap.MovingBlockBootstrap>`_ for more details.
    q : float, optional
        Significance level for box and elliptical constraints.
        The default is 0.05.
    n_sim : int, optional
        Number of simulations of the bootstrapping method.
        The default is 6000.
    window : int, optional
        Block size of the bootstrapping method. Must be greather than 1
        and lower than the n_samples - n_factors + 1
        The default is 3.
    diag : bool, optional
        If consider only the main diagonal of covariance matrices of estimation
        errors following :cite:`b-fabozzi2007robust`. The default is False.
    threshold : float, optional
        Parameter used to fix covariance matrices in case they are not positive semidefinite.
        The default is 1e-15.
    seed : int, optional
        Seed used to generate random numbers for bootstrapping method.
        The default is 0.

    Returns
    -------
    mu_l : DataFrame
        The q/2 percentile of mean vector obtained through the selected
        bootstrapping method.
    mu_u : DataFrame
        The 1-q/2 percentile of mean vector obtained through the selected
        bootstrapping method.
    cov_l : DataFrame
        The q/2 percentile of covariance matrix obtained through the selected
        bootstrapping method.
    cov_u : DataFrame
        The 1-q/2 percentile of covariance matrix obtained through the selected
        bootstrapping method.
    cov_mu : DataFrame
        The covariance matrix of estimation errors of mean vector obtained
        through the selected bootstrapping method.
    cov_sigma : DataFrame
        The covariance matrix of estimation errors of covariance matrix
        obtained through the selected bootstrapping method.
    k_mu : DataFrame
        The square root of size of elliptical constraint of mean vector
        estimation error based on 1-q percentile.
    k_sigma : DataFrame
        The square root of size of elliptical constraint of covariance matrix
        estimation error based on 1-q percentile.

    Raises
    ------
    ValueError
        When the value cannot be calculated.

    """

    if not isinstance(X, pd.DataFrame):
        raise TypeError("X must be a DataFrame")

    if window >= X.shape[0] - window + 1:
        raise ValueError("block must be lower than  n_samples - window + 1")
    elif window <= 1:
        raise ValueError("block must be greather than 1")

    cols = X.columns.tolist()
    cols_2 = [i + "-" + j for i in cols for j in cols]
    T, n = X.shape

    mu = X.mean().to_numpy().reshape(1, n)
    vec_Sigma = X.cov().to_numpy().reshape((1, n**2), order="F")

    mus = np.zeros((n_sim, 1, n))
    covs = np.zeros((n_sim, n, n))

    if kind == "stationary":
        gen = bs.StationaryBootstrap(window, X, seed=seed)
    elif kind == "circular":
        gen = bs.CircularBlockBootstrap(window, X, seed=seed)
    elif kind == "moving":
        gen = bs.MovingBlockBootstrap(window, X, seed=seed)
    else:
        raise ValueError("kind only can be 'stationary', 'circular' or 'moving'")

    i = 0
    for data in gen.bootstrap(n_sim):
        A = data[0][0]
        mus[i] = A.mean().to_numpy().reshape(1, n)
        covs[i] = A.cov().to_numpy()
        i += 1

    # Box Constraint for Mean
    mu_l = np.percentile(mus, q=q / 2 * 100, axis=0, keepdims=True).reshape(1, n)
    mu_u = np.percentile(mus, q=(1 - q / 2) * 100, axis=0, keepdims=True).reshape(1, n)
    mu_l = pd.DataFrame(mu_l, index=[0], columns=cols)
    mu_u = pd.DataFrame(mu_u, index=[0], columns=cols)

    # Box Constraint for Covariance
    cov_l = np.percentile(covs, q=q / 2 * 100, axis=0, keepdims=True).reshape(n, n)
    cov_u = np.percentile(covs, q=(1 - q / 2) * 100, axis=0, keepdims=True).reshape(
        n, n
    )
    cov_l = pd.DataFrame(cov_l, index=cols, columns=cols)
    cov_u = pd.DataFrame(cov_u, index=cols, columns=cols)

    # Check and fix if upper and lower bound for Covariance are positive
    # semidefinite and fix when they are not
    if af.is_pos_def(cov_l) is False:
        cov_l = af.cov_fix(cov_l, method="clipped", threshold=threshold)
    if af.is_pos_def(cov_u) is False:
        cov_u = af.cov_fix(cov_u, method="clipped", threshold=threshold)

    # Elliptical Constraint for Mean
    A_mu = mus.reshape(n_sim, n) - np.repeat(mu, n_sim, axis=0)
    cov_mu = np.cov(A_mu, rowvar=False)
    if diag is True:
        cov_mu = np.diag(np.diag(cov_mu))
    k_mus = np.diag(A_mu @ inv(cov_mu) @ A_mu.T)
    k_mu = np.percentile(k_mus, q=(1 - q) * 100) ** 0.5
    cov_mu = pd.DataFrame(cov_mu, index=cols, columns=cols)

    # Elliptical Constraint for Covariance
    A_Sigma = covs.reshape((n_sim, n**2), order="F")
    A_Sigma = A_Sigma - np.repeat(vec_Sigma, n_sim, axis=0)
    cov_sigma = np.cov(A_Sigma, rowvar=False)
    cov_sigma = af.cov_fix(cov_sigma, method="clipped", threshold=threshold)
    if diag is True:
        cov_sigma = np.diag(np.diag(cov_sigma))
    if af.is_pos_def(cov_sigma) is False:
        cov_sigma = af.cov_fix(cov_sigma, method="clipped", threshold=threshold)
    k_sigmas = np.diag(A_Sigma @ inv(cov_sigma) @ A_Sigma.T)
    k_sigma = np.percentile(k_sigmas, q=(1 - q) * 100) ** 0.5
    cov_sigma = pd.DataFrame(cov_sigma, index=cols_2, columns=cols_2)

    return mu_l, mu_u, cov_l, cov_u, cov_mu, cov_sigma, k_mu, k_sigma

```

[riskfolio/src/ParamsEstimation.py](https://github.com/dcajasn/Riskfolio-Lib/blob/344b899eb72e5636330647f08e3c5d88a8f71a84/riskfolio/src/ParamsEstimation.py#L1827-L1983) · [More projects using ARCH →](https://dashboard.exa.ai/playground/search?q=arch%20GitHub%20projects)

**Quickstart**

```python
import arch.data.sp500
from arch import arch_model

sp500 = arch.data.sp500.load()
sp500 = sp500.loc['2000-01-01':'2014-01-01']
returns = 100 * sp500['Adj Close'].pct_change().dropna()
model = arch_model(returns)
result = model.fit()

```

From [introduction.html](https://bashtage.github.io/arch/univariate/introduction.html)

### sktime

[GitHub](https://github.com/sktime/sktime) · [PyPI](https://pypi.org/project/sktime) · [Docs](https://www.sktime.net/en/stable/examples/01_forecasting.html)

Provides a unified framework for machine learning with time series.

- Downloads / mo: 678.5K
- Stars: 10.1K
- Last release: 1.3.0
- License: BSD-3-Clause
- Capabilities: [From the sktime docs](https://www.sktime.net/en/stable/examples/01_forecasting.html)

```sh
pip install sktime
```

**Quickstart**

```python
from sktime.datasets import load_airline
from sktime.forecasting.naive import NaiveForecaster

y = load_airline()
forecaster = NaiveForecaster(strategy='last')
forecaster.fit(y)
forecast = forecaster.predict(fh=[1, 2, 3])
print(forecast)

```

From [README.md](https://www.sktime.net/en/stable/examples/01_forecasting.html) · [Find projects using sktime →](https://dashboard.exa.ai/playground/search?q=sktime%20GitHub%20projects)

### STUMPY

[GitHub](https://github.com/stumpy-dev/stumpy) · [PyPI](https://pypi.org/project/stumpy) · [Docs](https://github.com/stumpy-dev/stumpy/blob/main/README.rst)

Mines time series data for a variety of tasks.

- Downloads / mo: 292.1K
- Stars: 4.2K
- Last release: 1.14.1
- License: BSD-3-Clause
- Capabilities: [From the STUMPY docs](https://github.com/stumpy-dev/stumpy/blob/main/README.rst)

```sh
pip install stumpy
```

**aeon-toolkit/aeon** (1.5K stars)

[aeon-toolkit/aeon](https://github.com/aeon-toolkit/aeon) 

```python
def _predict(self, X: np.ndarray) -> np.ndarray:
    import stumpy

    self._check_params(X)
    mp = stumpy.stump(
        X[:, 0],
        m=self.window_size,
        ignore_trivial=self.ignore_trivial,
        normalize=self.normalize,
        p=self.p,
        k=self.k,
    )
    point_anomaly_scores = reverse_windowing(mp[:, 0], self.window_size)
    return point_anomaly_scores

```

[aeon/anomaly_detection/series/distance_based/_stomp.py](https://github.com/aeon-toolkit/aeon/blob/6d5ef3cdf463e08bafc6d95314c23323c7a1d468/aeon/anomaly_detection/series/distance_based/_stomp.py#L84-L97) · [More projects using STUMPY →](https://dashboard.exa.ai/playground/search?q=stumpy%20GitHub%20projects)

**Quickstart**

```python
import stumpy
import numpy as np

if __name__ == "__main__":
    your_time_series = np.random.rand(10000)
    window_size = 50  # Approximately, how many data points might be found in a pattern 

    matrix_profile = stumpy.stump(your_time_series, m=window_size)

```

From [README.rst](https://github.com/stumpy-dev/stumpy/blob/main/README.rst)

### tsfresh

[GitHub](https://github.com/blue-yonder/tsfresh) · [PyPI](https://pypi.org/project/tsfresh) · [Docs](https://tsfresh.readthedocs.io/en/latest/text/quick_start.html)

Automates feature engineering from time-series and other ordered data.

- Downloads / mo: 189.2K
- Stars: 9.5K
- Last release: 0.21.2
- License: MIT
- Capabilities: [From the tsfresh docs](https://tsfresh.readthedocs.io/en/latest/text/quick_start.html)

**Strengths**

- **Extracts features automatically.** Calculate signal characteristics instead of writing each feature calculation.
- **Selects features against target labels.** Use select_features to retain features relevant to the supplied target.

**Watch out for**

- **Designed for offline data.** Use another approach for online streaming feature calculation.
- **Irregular intervals need feature selection.** Some features assume equal spacing even though timestamps only order observations.

```sh
pip install tsfresh
```

**aeon-toolkit/aeon** (1.5K stars)

[aeon-toolkit/aeon](https://github.com/aeon-toolkit/aeon) 

```python
def _transform(self, X, y=None):
    """Transform X and return a transformed version.

    private _transform containing core logic, called from transform

    Parameters
    ----------
    X : 3D np.ndarray of shape (n_cases, n_channels, n_timepoints)
        or list of np.ndarray of shape [n_cases], where each array is a
        2D np.ndarray of shape = [n_channels, n_timepoints_i]
        input time series collection.
    y : ignored argument for interface compatibility

    Returns
    -------
    Xt : np.ndarray of shape (n_cases, n_features)
        Transformed data.
    """
    Xt = _from_collection_to_long(X)

    # lazy imports to avoid hard dependency
    from tsfresh import extract_features

    Xt = extract_features(
        Xt,
        column_id="index",
        column_value="value",
        column_kind="column",
        column_sort="time_index",
        **self.default_fc_parameters_,
    )
    return Xt.to_numpy()

```

[aeon/transformations/collection/feature_based/_tsfresh.py](https://github.com/aeon-toolkit/aeon/blob/6d5ef3cdf463e08bafc6d95314c23323c7a1d468/aeon/transformations/collection/feature_based/_tsfresh.py#L280-L311) · [More projects using tsfresh →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20tsfresh%20for%20time-series%20analysis&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
from tsfresh.examples.robot_execution_failures import (
    download_robot_execution_failures, load_robot_execution_failures,
)
from tsfresh import extract_features

download_robot_execution_failures()
timeseries, y = load_robot_execution_failures()
features = extract_features(timeseries, column_id='id', column_sort='time')

```

From [quick_start.html](https://tsfresh.readthedocs.io/en/latest/text/quick_start.html)

## FAQ

### Which Python time series library should I use?

[pandas](#pandas) suits time-indexed data, resampling, and rolling calculations. [statsmodels](#statsmodels) suits seasonal decomposition and models of related series. [ruptures](#ruptures) suits change point detection. [tsfresh](#tsfresh) suits automatic feature extraction.

### What is STUMPY?

[STUMPY](#stumpy) is a library for a variety of time series data mining tasks.

### How do I resample a time series in pandas?

[pandas](#pandas) resamples timestamped observations to another frequency. Rolling windows can also apply an arbitrary function to each window.

### What is tsfresh?

[tsfresh](#tsfresh) automates feature engineering from time series and other ordered data and selects features against target labels.

### What is sktime?

[sktime](#sktime) is a unified framework for machine learning with time series.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best Python time series libraries pandas statsmodels tsfresh ruptures code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
