time-aware-imputer
Time-aware missing data imputation for irregular time series
What it is and what it does
Time-aware-imputer is a Python library that fills missing values in time-series data by understanding that gaps of different durations require different treatment. Unlike generic imputation methods that ignore temporal structure, this library uses spline interpolation (linear, cubic, quadratic, PCHIP, or Akima) to reconstruct missing values while preserving temporal trends. It wraps scipy's interpolation functions with a scikit-learn compatible API, so it integrates into standard ML pipelines.
The package provides two main tools: SplineImputer for filling missing values with your choice of interpolation method, and GapAnalyzer for diagnosing missing data patterns—counting gaps, measuring their duration, and visualizing them. It's designed for IoT sensor networks, industrial monitoring, and other scenarios where time-series data arrives irregularly and you need to understand and fill the gaps before analysis or modeling.
Use it for:
- Impute sensor readings from IoT devices that report at irregular intervals or have communication failures.
- Fill gaps in financial time-series data (stock prices, exchange rates) while preserving trend direction.
- Analyze and visualize missing data patterns in multi-sensor industrial equipment before preprocessing for ML.
- Prepare time-series data for scikit-learn pipelines by handling missing values with time-aware methods.
- Reconstruct monotonic or smooth trends in environmental monitoring data (temperature, humidity, pressure).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fills missing values in time-series data while respecting irregular time intervals, using spline-based interpolation methods and providing gap analysis tools.
Yes, if you work with irregular time-series data and need intelligent gap-filling. The library is actively maintained, has no known vulnerabilities, and integrates cleanly with pandas and scikit-learn. However, it is early-stage (Alpha, 2 stars, 167 days old), so expect the API or behavior to evolve; use it for production work only if you can tolerate potential breaking changes or have capacity to adapt.
Install
time-aware-imputer on PyPI
pip
pip install time-aware-imputeruv
uv add time-aware-imputerpoetry
poetry add time-aware-imputerInstalling time-aware-imputer
Before you install
Low friction install with five standard scientific dependencies (numpy, pandas, scipy, scikit-learn, matplotlib). Active maintenance as of 2026-02-28 with recent commits; early-stage project (Alpha status, 2 stars) so community validation is limited.
License in practice
MIT license permits commercial and private use with minimal restrictions; you must include the license text in distributions but face no copyleft obligations.
Quickstart
pip install time-aware-imputer
import pandas as pd
import numpy as np
from time_aware_imputer import SplineImputer, GapAnalyzer
df = pd.DataFrame({
'timestamp': pd.date_range('2024-01-01', periods=100, freq='h'),
'temperature': np.random.randn(100)
})
df.loc[10:15, 'temperature'] = np.nan
imputer = SplineImputer(method='cubic')
df_imputed = imputer.fit_transform(df)
Requires a 'timestamp' column (or explicitly named time column) in your DataFrame; the imputer expects pandas DataFrames with datetime index or explicit timestamp column.
Verify before relying
- Whether the library handles multivariate imputation (correlations between columns) or treats each column independently.
- Performance characteristics on large datasets (memory usage, computational cost for different interpolation methods).
- How the library behaves with very sparse data or extremely irregular sampling intervals.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — numpy, pandas, scipy, scikit-learn, matplotlib |
| Maintenance | actively maintained — 167 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 345,368/month — #7,364 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: time_aware_imputer-1.0.0-py3-none-any.whl
Keywords: time-series, imputation, missing-data, interpolation, data-science, machine-learning, iot, sensors
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
ai4tsAI4TS provides a framework for building machine…
permissive · top 15,000 on PyPI
missingpyFills missing values in data arrays using…
copyleft · top 15,000 on PyPI
pypotsPyPOTS provides machine learning algorithms for…
permissive · top 15,000 on PyPI
miceforestPerforms Multiple Imputation by Chained…
permissive · top 15,000 on PyPI
stumpySTUMPY computes the matrix profile for time…
permissive · top 15,000 on PyPI
benchpotsBenchPOTS provides standardized preprocessing…
permissive · top 15,000 on PyPI
torchcdeProvides differentiable GPU-capable solvers for…
permissive · top 15,000 on PyPI
tsdbTSDB downloads and loads 173 open-source…
permissive · top 15,000 on PyPI
sagemaker-scikit-learn-extensionExtends scikit-learn with additional estimators…
permissive · top 15,000 on PyPI
pytsPyts provides time series classification…
permissive · top 15,000 on PyPI