skillfed

tsfresh

tsfresh extracts relevant characteristics from time series

tsfresh v0.21.2 372.1K downloads/30d#7,167 on PyPI9,284
Permissive license MIT Active released

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 tsfresh

uv

uv add tsfresh

poetry

poetry add tsfresh

Installing 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

Development Status :: 4 - BetaIntended Audience :: Science/ResearchOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Software Development

Tags

time series feature extractionautomated feature engineering time seriestime series feature selectionhypothesis testing feature filteringtime series characteristics extractionstatistical time series featuressignal processing feature extraction
time-series-mlfeature-engineeringhypothesis-testing

More Software Development packages