tsam is a time series aggregation module for creating typical periods (e.g., days or weeks) from high-resolution time series, commonly used in energy system modeling and other time series analysis. It provides methods like k-means clustering, hierarchical clustering, and averaging to reduce data while preserving key statistical features. Current version: 3.4.1, requires Python >=3.10, <3.15. Release cadence: periodic, with major version bumps for breaking changes.
pip install tsamNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: create a TimeSeriesAggregation object from a pandas DataFrame and generate typical periods.
Update imports to 'from tsam import TimeSeriesAggregation' and adjust method calls according to v3 API.
Use 'noTypicalPeriods' for v3, 'n_clusters' for v2. Check documentation for the version you are using.
Ensure raw.index is a DatetimeIndex or a monotonically increasing integer index. Use pd.DatetimeIndex or reset_index(drop=True) appropriately.
Prefer 'aggregator.aggregate()' if available; check changelog for transition.
Run 'pip install tsam' in the correct Python environment.
Upgrade tsam to >=3.0.0 using 'pip install --upgrade tsam' and import using 'from tsam import TimeSeriesAggregation'.
Reduce 'noTypicalPeriods' to a value less than or equal to len(raw).
Use 'noTypicalPeriods' instead of 'n_clusters' for the number of typical periods.
No resource links recorded.