Python time-series libraries

Updated Nov 2026

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

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

LibraryMonthly downloadsStarsLast releaseLicense
pandas
706.0M
49.6KNov 2026BSD-3-Clause
Statsmodels
40.4M
11.8KAug 2026BSD-3-Clause
Prophet
4.1M
20.5KOct 2026MIT
ruptures
1.3M
2.1KSep 2025BSD-2-Clause
ARCH
1.1M
1.7KNov 2026NCSA
sktime
678.5K
10.1KNov 2026BSD-3-Clause
STUMPY
292.1K
4.2KFeb 2026BSD-3-Clause
tsfresh
189.2K
9.5KMay 2026MIT
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

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

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.

Limitations

  • 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.

Quickstart

From timeseries.rst
$ pip install pandas
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())

pandas examples

From open-source projects on GitHub

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

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.

Limitations

  • 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.

Quickstart

From vector_ar.html
$ pip install statsmodels
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)

Statsmodels examples

From open-source projects on GitHub

Runs an automatic forecasting procedure.

Downloads / mo
4.1M
Stars
20.5K
Last release
1.5.0
License
MIT

Quickstart

From quick_start.html
$ pip install prophet
# 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)

Prophet examples

From open-source projects on GitHub

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

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.

Limitations

  • 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.

Quickstart

From binseg-reference.md
$ pip install ruptures
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)

ruptures examples

From open-source projects on GitHub

Implements ARCH models in Python.

Downloads / mo
1.1M
Stars
1.7K
Last release
9.0.0
License
NCSA

Quickstart

From introduction.html
$ pip install arch
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()

ARCH examples

From open-source projects on GitHub

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

Quickstart

From README.md
$ pip install sktime
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)

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

Quickstart

From README.rst
$ pip install stumpy
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)

STUMPY examples

From open-source projects on GitHub

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

Downloads / mo
189.2K
Stars
9.5K
Last release
0.21.2
License
MIT

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.

Limitations

  • 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.

Quickstart

From quick_start.html
$ pip install tsfresh
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')

tsfresh examples

From open-source projects on GitHub

FAQ

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

STUMPY is a library for a variety of time series data mining tasks.

pandas resamples timestamped observations to another frequency. Rolling windows can also apply an arbitrary function to each window.

tsfresh automates feature engineering from time series and other ordered data and selects features against target labels.

sktime is a unified framework for machine learning with time series.

For coding agents

Found your time-series library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official