tsdownsample
Time series downsampling in rust
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and solves a real performance problem for time series visualization. Install friction is moderate but manageable thanks to prebuilt wheels. Choose it if you regularly work with large time series and need fast, memory-efficient downsampling; skip it if your datasets are small or you don't need visualization-specific algorithms.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.8–3.14 across macOS, Linux (multiple architectures), and Windows, so installation is typically straightforward.
- Repository is active with recent commits.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-06-01 (74 days) · last repo commit 2026-06-01 · 234 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 622,336 downloads/mo, #5,711 on PyPI
Alternatives
Verify before relying
pip install tsdownsample
from tsdownsample import MinMaxLTTBDownsampler
import numpy as np
y = np.random.randn(10_000_000)
x = np.arange(len(y))
downsampler = MinMaxLTTBDownsampler()
indices = downsampler.downsample(x, y, n_out=1000)
downsampled_x = x[indices]
downsampled_y = y[indices]- Whether the library's performance claims (e.g., 200–300x speedup for f16 argminmax) have been independently validated outside the project.
- Real-world memory overhead and performance scaling characteristics when working with datasets larger than 10 million points.
- Behavior and performance when handling time series with significant gaps or irregular sampling rates.
What it is and what it does
tsdownsample is a Rust-based time series downsampling library that reduces large datasets to a smaller number of points while preserving visual fidelity. It implements four downsampling algorithms—MinMax, M4, LTTB (Largest Triangle Three Buckets), and a hybrid MinMaxLTTB—each returning indices into the original data rather than copies. The library is designed to handle visualization pipelines where rendering millions of points is impractical.
The package depends only on numpy and works with a wide range of numeric types (f16, f32, f64, integers, datetime64, timedelta64, and bool for y-data). It supports optional multithreading via Rayon in Rust, bypassing Python's GIL, and includes variants for handling NaN values. The API is straightforward: instantiate a downsampler class, call its downsample method with your data and desired output count, and use the returned indices to select downsampled points from the original arrays.
Use it for
- Downsampling stock price or sensor data with millions of points before plotting in a web dashboard or interactive visualization tool.
- Preparing large time series datasets for exploratory data analysis without losing visual representation of trends and extrema.
- Reducing memory footprint and rendering time when displaying high-frequency financial or IoT time series in real-time monitoring applications.
- Selecting representative points from irregularly sampled time series (e.g., event logs) while preserving important features.
- Accelerating data pipelines that feed large time series into machine learning models by pre-filtering to key points.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and solves a real performance problem for time series visualization. Install friction is moderate but manageable thanks to prebuilt wheels. Choose it if you regularly work with large time series and need fast, memory-efficient downsampling; skip it if your datasets are small or you don't need visualization-specific algorithms.
Install
tsdownsample on PyPI
Before you install
Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.8–3.14 across macOS, Linux (multiple architectures), and Windows, so installation is typically straightforward. Repository is active with recent commits.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install tsdownsample
from tsdownsample import MinMaxLTTBDownsampler
import numpy as np
y = np.random.randn(10_000_000)
x = np.arange(len(y))
downsampler = MinMaxLTTBDownsampler()
indices = downsampler.downsample(x, y, n_out=1000)
downsampled_x = x[indices]
downsampled_y = y[indices]
Verify before relying
- Whether the library's performance claims (e.g., 200–300x speedup for f16 argminmax) have been independently validated outside the project.
- Real-world memory overhead and performance scaling characteristics when working with datasets larger than 10 million points.
- Behavior and performance when handling time series with significant gaps or irregular sampling rates.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 74 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 622,336 / month, #5,711 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: tsdownsample-0.1.5.1-cp310-cp310-macosx_10_12_x86_64.whl; tsdownsample-0.1.5.1-cp310-cp310-macosx_11_0_arm64.whl; tsdownsample-0.1.5.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; tsdownsample-0.1.5.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl; tsdownsample-0.1.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tsdownsample-0.1.5.1-cp310-cp310-manylinux_2_24_armv7l.whl; tsdownsample-0.1.5.1-cp310-cp310-manylinux_2_24_ppc64le.whl; tsdownsample-0.1.5.1-cp310-cp310-manylinux_2_24_s390x.whl; tsdownsample-0.1.5.1-cp310-cp310-musllinux_1_1_aarch64.whl; tsdownsample-0.1.5.1-cp310-cp310-musllinux_1_1_x86_64.whl; tsdownsample-0.1.5.1-cp310-cp310-win32.whl; tsdownsample-0.1.5.1-cp310-cp310-win_amd64.whl; tsdownsample-0.1.5.1-cp311-cp311-macosx_10_12_x86_64.whl; tsdownsample-0.1.5.1-cp311-cp311-macosx_11_0_arm64.whl; tsdownsample-0.1.5.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; tsdownsample-0.1.5.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl; tsdownsample-0.1.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tsdownsample-0.1.5.1-cp311-cp311-manylinux_2_24_armv7l.whl; tsdownsample-0.1.5.1-cp311-cp311-manylinux_2_24_ppc64le.whl; tsdownsample-0.1.5.1-cp311-cp311-manylinux_2_24_s390x.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “time series downsampling”
- tsdownsampleDownsamples large time series datasets to a smaller number of…
- lttbDownsamples time series data using the Largest-Triangle-Three-Buckets…
- pixeloeConverts standard images into pixel art using contrast-aware outline…
Give your agent the search over MCP, or paste the wish link into any chat.
More Information Analysis packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.
Install it if you use Snowflake and want to process data without moving it to your application layer.
See also lttb · plotly-resampler · stumpy · tslearn · tsdb · pixeloe · numpy-minmax · utilsforecast · powershap · tsfresh