l4v1
l4v1 is a Python library designed to simplify data analytics tasks through data manipulation and visualization techniques. Built on top of Polars and Plotly, it offers a straightforward API for quickly creating detailed summaries. This project is a work in progress, and more functionality will be added in the future.
Installation
You can install the l4v1 package directly from PyPI:
pip install l4v1
Usage
Calculate price, volume, and mix effects conveniently, and visualize them in an Excel heatmap or a Plotly waterfall chart.
Start by importing Polars to load the data:
import polars as pl
# Load your datasets
sales_week_1 = pl.read_csv("data/sales_week1.csv")
sales_week_2 = pl.read_csv("data/sales_week2.csv")
Once you have the data, import the PVM module:
from l4v1.price_volume_mix import PVM
# Initialize the class with your data and desired dimensions
pvm = PVM(
df_primary=sales_week_2, # Data to analyse
df_comparison=sales_week_1, # Data to compare against
group_by_columns=["Product line", "Customer type"] # Dimension(s) to use
volume_column_name="Quantity", # Column name containing volume (e.g. quantity)
outcome_column_name="Total", # Column name containing outcome (e.g. revenue or cost)
)
Once the class is initialized, you can decide whether to create an Excel table, a Plotly waterfall chart, or continue working with the data in a Polars DataFrame.
To create a waterfall chart:
pvm.waterfall_plot(
primary_total_label="Week 2 Sales", # Optional label
comparison_total_label="Week 1 Sales", # Optional label
title="Sales Week 2 vs 1", # Optional title,
color_total = "#F1F1F1", # Optional color for totals
# etc.
)
In Excel, it is easier to visualize if there are many dimensions used:
pvm.write_xlsx_table("your/path/file_name.xlsx") # Must end to .xlsx file extensions
For large datasets, it might be most convenient to continue exploring directly in Polars. In that case, simply call get_table:
pvm.get_table()
Metadata
Release files for l4v1 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| l4v1-0.2.4.tar.gz | 360.1 kB | Without provenance | Details for l4v1-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| l4v1-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for l4v1-0.2.4-py3-none-any.whl |
Total release size: 370.0 kB
Release files / l4v1-0.2.4.tar.gz
| Download URL | l4v1-0.2.4.tar.gz |
|---|---|
| Size | 360.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6dc44c7543da8946176aa636e0ab4116319c6a04e37d2f06a59b2be0198c381
|
|
BLAKE2b-256 checksum How to use checksums |
9cd666c4b96d3963d1ee0e13bd2cda9e822340fac576cb67d37cea195db3de8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / l4v1-0.2.4-py3-none-any.whl
| Download URL | l4v1-0.2.4-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62dd18141b29ef8e33b2ffa042a6723b5b96f150ad38ce84fed53f7b2451dfa0
|
|
BLAKE2b-256 checksum How to use checksums |
e783db3b0feccc08475edac6a187e0773980aa31cc05953da077ff66ec278830
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for l4v1 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.