Function reference

πŸš€ Data Visualization

Visualize time series data with one line of code.

plot_timeseries Creates time series plots using different plotting engines such as Plotnine,

πŸ”₯ Wrangling Pandas Time Series DataFrames

Bend time series data to your will.

summarize_by_time Summarize a DataFrame or GroupBy object by time.
apply_by_time Apply for time series.
pad_by_time Make irregular time series regular by padding with missing dates.
filter_by_time Filters a DataFrame or GroupBy object based on a specified date range.
future_frame Extend a DataFrame or GroupBy object with future dates.

πŸ” Anomaly Detection

Detect anomalies in time series data.

anomalize Detects anomalies in time series data, either for a single time
plot_anomalies Creates plot of anomalies in time series data using Plotly, Matplotlib,
plot_anomalies_decomp The plot_anomalies_decomp function takes in data from the anomalize()
plot_anomalies_cleaned The plot_anomalies_cleaned function takes in data from the anomalize()

πŸŒͺ️ Correlation Funnel

Visualize correlation on any tabular dataset (not just for Time Series).

binarize The binarize function prepares data for correlate, which is used for analyzing correlationfunnel plots.
correlate The correlate function calculates the correlation between a target variable and all other
plot_correlation_funnel The plot_correlation_funnel function generates a correlation funnel plot using either Plotly or

πŸ—οΈ Feature Engineereing

Adding Features to Time Series DataFrames (Augmenting)

augment_timeseries_signature The function augment_timeseries_signature takes a DataFrame and a date
augment_holiday_signature Engineers 4 different holiday features from a single datetime for 137 countries
augment_lags Adds lags to a Pandas DataFrame or DataFrameGroupBy object.
augment_leads Adds leads to a Pandas DataFrame or DataFrameGroupBy object.
augment_diffs Adds differences and percentage difference (percentage change) to a Pandas DataFrame or DataFrameGroupBy object.
augment_pct_change Adds percentage difference (percentage change) to a Pandas DataFrame or DataFrameGroupBy object.
augment_rolling Apply one or more Series-based rolling functions and window sizes to one or more columns of a DataFrame.
augment_rolling_apply Apply one or more DataFrame-based rolling functions and window sizes to one
augment_expanding Apply one or more Series-based expanding functions to one or more columns of a DataFrame.
augment_expanding_apply Apply one or more DataFrame-based expanding functions to one or more columns of a DataFrame.
augment_ewm Add Exponential Weighted Moving (EWM) window functions to a DataFrame or
augment_fourier Adds Fourier transforms to a Pandas DataFrame or DataFrameGroupBy object.
augment_hilbert Apply the Hilbert transform to specified columns of a DataFrame or
augment_wavelet Apply the Wavely transform to specified columns of a DataFrame or

πŸ“Ž TS Features

Python implementation of the R package tsfeatures.

ts_features Extracts aggregated time series features from a DataFrame or DataFrameGroupBy object using the tsfeatures package.
ts_summary Computes summary statistics for a time series data, either for the entire

πŸ’Ή Finance Module (Momentum Indicators)

Momentum indicators for financial time series data.

augment_macd Calculate MACD for a given financial instrument using either pandas or polars engine.
augment_ppo Calculate PPO for a given financial instrument using either pandas or polars engine.
augment_rsi The augment_rsi function calculates the Relative Strength Index (RSI) for a given financial
augment_cmo The augment_cmo function calculates the Chande Momentum Oscillator (CMO) for a given financial
augment_roc Adds rate of change (percentage change) to a Pandas DataFrame or DataFrameGroupBy object.
augment_qsmomentum The function augment_qsmomentum calculates Quant Science Momentum for financial data.

πŸ’Ή Finance Module (Volatility Indicators)

Volatility indicators for financial time series data.

augment_bbands The augment_bbands function is used to calculate Bollinger Bands for a given dataset and return
augment_atr The augment_atr function is used to calculate Average True Range (ATR) and

🐼 Time Series for Pandas Series

Time series functions that generate / manipulate Pandas Series.

make_future_timeseries Make future dates for a time series.
make_weekday_sequence Generate a sequence of weekday dates within a specified date range,
make_weekend_sequence Generate a sequence of weekend dates within a specified date range,
get_date_summary Returns a summary of the date-related information, including the number of
get_frequency_summary More robust version of pandas inferred frequency.
get_diff_summary Calculates summary statistics of the time differences between consecutive values in a datetime index.
get_frequency Get the frequency of a pandas Series or DatetimeIndex.
get_seasonal_frequency The get_seasonal_frequency function returns the seasonal period of a given
get_trend_frequency The get_trend_frequency function returns the trend period of a given time
get_timeseries_signature Convert a timestamp to a set of 29 time series features.
get_holiday_signature Engineers 4 different holiday features from a single datetime for 137 countries

πŸ› οΈ Date Utilities

Helper functions to make your life easier.

floor_date Robust date flooring.
ceil_date Robust date ceiling.
is_holiday Check if a given list of dates are holidays for a specified country.
week_of_month The β€œweek_of_month” function calculates the week number of a given date
timeseries_unit_frequency_table The function timeseries_unit_frequency_table returns a pandas DataFrame
time_scale_template The function time_scale_template returns a table with time scale

πŸ› οΈ Visualization Utilities

Helper functions to make your life easier.

theme_timetk Returns a plotnine theme with timetk styles applied, allowing for
palette_timetk The function palette_timetk returns a dictionary of color codes for

Extra Pandas Helpers (That Help Beyond Just Time Series)

glimpse Takes a pandas DataFrame and prints a summary of its dimensions, column
parallel_apply The parallel_apply function parallelizes the application of a function on
progress_apply Adds a progress bar to pandas apply().
drop_zero_variance The function drop_zero_variance takes a pandas DataFrame as input and returns a new DataFrame with
transform_columns The function transform_columns applies a user-provided function to specified columns in a pandas DataFrame.
flatten_multiindex_column_names Takes a DataFrame as input and flattens the column

πŸ’Ύ 13 Datasets

Practice pytimetk with 13 complementary time series datasets.

get_available_datasets Get a list of 12 datasets that can be loaded with pytimetk.load_dataset.
load_dataset Load one of 12 Time Series Datasets.