tsfresh
tsfresh extracts relevant characteristics from time series
What it is and what it does
tsfresh is a Python package that automates time-series feature extraction by computing features from raw time-series data using established algorithms from statistics, time-series analysis, signal processing, and nonlinear dynamics. It combines these algorithms with a built-in feature selection procedure based on hypothesis testing to filter out irrelevant features. The package interprets "time series" broadly—it works with any sampled data or event sequences, making it applicable to sensor data, financial time series, activity recognition, and even text as event sequences.
The typical workflow is: feed tsfresh a pandas DataFrame containing your time series grouped by ID, and it returns a feature matrix where each row represents a time series and each column is a computed characteristic. The filtering step uses multiple hypothesis testing to mathematically control the false discovery rate, helping you avoid extracting noise or redundant information. The resulting feature matrix integrates seamlessly with numpy, pandas, and scikit-learn for downstream machine learning tasks like classification or regression.
Use it for:
- Sensor anomaly detection: extract features from sensor readings to train classifiers that identify abnormal behavior.
- Activity recognition: compute features from accelerometer or IMU data to classify human movements or equipment states.
- Time-series clustering: extract features to group similar time series even when they have different lengths or missing data.
- Imbalanced classification: use extracted features with undersampling techniques to handle imbalanced time-series datasets.
- Image and spatial analysis: apply feature extraction to spatial variation sequences derived from 2D or 3D images.
- Forecasting preparation: engineer features from historical time series to improve regression or prediction models.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automatically extracts hundreds of time-series features from sampled data using statistical and signal-processing algorithms, then filters them to identify only those relevant to your machine learning task.
Yes. tsfresh is actively maintained, well-documented, and widely used. It solves a real problem—automating feature engineering for time series—with a mathematically sound filtering approach. Low install friction, no known vulnerabilities, and permissive MIT license make it a safe choice for research and production use. Install it if you work with time-series data and want to avoid manual feature engineering.
Install
tsfresh on PyPI
pip
pip install tsfreshuv
uv add tsfreshpoetry
poetry add tsfreshInstalling tsfresh
Before you install
Low friction install with a pure-Python wheel and 11 well-established scientific dependencies. Actively maintained as of 2026-07-06 with 9284 GitHub stars.
License in practice
MIT license is permissive; you can use, modify, and distribute tsfresh freely in commercial and open-source projects without restriction.
Quickstart
pip install tsfresh
from tsfresh import extract_features
import pandas as pd
# DataFrame with columns: id, time, and feature columns
ts_data = pd.DataFrame({...})
features = extract_features(ts_data, column_id='id', column_sort='time')
Requires Python 3.9 or later; input data must be a pandas DataFrame with an id column to group time series and a sort column for ordering.
Verify before relying
- Whether the package scales efficiently to very large datasets or requires distributed computing setup.
- Performance characteristics when extracting features from many time series simultaneously.
- Memory footprint when working with high-frequency or very long time series.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — requests, numpy, pandas, statsmodels, patsy, pywavelets, scikit-learn, tqdm, stumpy, cloudpickle, scipy |
| Maintenance | actively maintained — 75 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 372,085/month — #7,167 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tsfresh-0.21.2-py2.py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
ai4tsAI4TS provides a framework for building machine…
permissive · top 15,000 on PyPI
rupturesDetects change points in time series and signal…
permissive · top 5,000 on PyPI
tsdbTSDB downloads and loads 173 open-source…
permissive · top 15,000 on PyPI
sktimesktime provides a unified interface for time…
permissive · top 5,000 on PyPI
pypotsPyPOTS provides machine learning algorithms for…
permissive · top 15,000 on PyPI
dtw-pythonComputes Dynamic Time Warping alignments…
copyleft · top 15,000 on PyPI
powershapPowershap performs feature selection by testing…
permissive · top 15,000 on PyPI
coreforecastProvides fast C++ implementations of…
permissive · top 5,000 on PyPI
pytsPyts provides time series classification…
permissive · top 15,000 on PyPI