Skip to main content

Wrapper for plotting with seaborn using Polars dataframes and lazyframes

Project description

seaborn_polars

Wrapper allowing to use Polars DataFrames and LazyFrames for plotting with seaborn

Requirements

Python 3.8+

Seaborn, Polars, Pandas, Numpy, Pyarrow

Installation

Use regular pip install:

pip install seaborn_polars pandas numpy polars seaborn pyarrow

Alternatively, clone this repository.

Usage

The package is a wrapper around seaborn plotting functions allowing to use Polars DataFrames and LazyFrames with the same syntax as when using Pandas DataFrames.

import polars as pl
import seaborn_polars as snl

df = pl.scan_csv('data.csv')

snl.scatterplot(df, x='rating', y='responses', hue='gender')

The package uses a deepcopy of original data. That way the original dataframe remains unaffected. For example, in the code snippet above, if we check the type of df after plotting we'll see that it is still a Polars LazyFrame.

All the plotting functions and parameters are identical to seaborn. When using data parameter, it has to be positional-only, the rest of parameters are keyword arguments.

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

seaborn_polars-0.0.2.6.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

seaborn_polars-0.0.2.6-py3-none-any.whl (6.6 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