Skip to main content

mspu

PyPI - Version PyPI - Downloads License: MIT

MSPU: Minimal Set of Python Utilities

Lightweight utilities for pandas and Polars.

The mspu package provides a collection of commonly used utilities for DataFrame testing, manipulation, and inspection.

It currently includes:

  • ht — Display the head and tail of pandas and Polars DataFrames.
  • gen_rand_df — Generate dummy pandas DataFrames for testing.
  • explode_date_range — Efficiently expand date ranges in pandas DataFrames into rows.

Installation

Using pip:

pip install mspu

Using uv:

uv pip install mspu

Quick Start

Display the head and tail of a DataFrame simultaneously with some display settings.

Import mspu.pandas to register the ht accessor on pandas DataFrames.

import pandas as pd
import mspu.pandas

df = pd.DataFrame({
  'foo': [1.12345, 2.98765, 3.14159],
  'bar': [7, 8, 9],
  'ham': ['x', 'y', 'z'],
})
# n: 1 - one row from the head and one row from the tail are displayed
# c: 2 - two columns are displayed
# r: 3 - the number of decimal places for number rounding
# w: -1 - unlimited display width
df.ht(n=1, c=2, r=3, w=-1)

The DataFrame will be displayed as:

shape: (3, 3)
     foo  ...  ham
0  1.123  ...    x
2  3.142  ...    z

Documentation

See the mspu documentation for more details.

Release files for mspu 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mspu 0.0.2
File Size Uploaded
mspu-0.0.2.tar.gz 26.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mspu 0.0.2
File Interpreter ABI Platform
mspu-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 43.3 kB

Release files / mspu-0.0.2.tar.gz

Download URL mspu-0.0.2.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
22ccdc3551333d1846f9109e87eeda69ef749439ed2bced9e473338b54db86cc
BLAKE2b-256 checksum
How to use checksums
56a384bd78d23d382b955c67e0874c6f1de8c6bcee8fd3e16d06e8d7e89d83dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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":null}

Release files / mspu-0.0.2-py3-none-any.whl

Download URL mspu-0.0.2-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9511563e2abbc7b2dc94af30957d4ef6810c8fc648c68202f3fe9324f79e282
BLAKE2b-256 checksum
How to use checksums
25f80658fdbd23848afbdf5f40ff379380d6498ce34f649259a94a564e7aa2f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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":null}

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page