Skip to main content

Apply groupwise lowess smoothing to a dataframe

Project description

Lowess Grouped

Apply groupwise lowess smoothing to a dataframe.

lowess-grouped-example

Usage

Install the package:

pip install lowess-grouped

Then simply import the package, and call the function lowess_grouped with your dataframe df:

from lowess_grouped.lowess_grouped import lowess_grouped

df_smoothed = lowess_grouped(df, 
                             x_name="year", 
                             y_name="temperature_anomaly",
                             group_name="region_name", 
                             frac=0.05)

For a more detailed example take a look at the notebook temperature-example.ipynb.

More

This project builds upon the lowess function from statsmodels.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lowess_grouped-0.0.2.tar.gz (304.2 kB view hashes)

Uploaded Source

Built Distribution

lowess_grouped-0.0.2-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page