Skip to main content

🔬 Simple data inspection tools for Polars - basic X-ray analysis and utilities for DataFrames.

Project description

🔬 Polarscope

PyPI - Python Version License: MIT

Simple data inspection tools for Polars 🐻‍❄️

Polarscope is a basic data analysis library for Polars DataFrames. It provides an xray() function for data inspection and some plotting utilities. Still early in development with more features planned.


✨ Current Features

🔬 Data Inspection

  • xray(df) → Basic data summary with statistics and data quality info
  • Shows column types, missing values, basic stats (mean, std, percentiles)
  • Optional expanded mode with additional metrics
  • Great Tables formatting for nice output

📊 Built-in Datasets

  • from polarscope.datasets import titanic, diabetes → Small datasets for testing
  • Useful for trying out the library functions

🧹 Basic Utilities (Limited functionality)

  • Some data cleaning functions (still being developed)
  • Plotting functions (basic implementation)

🚀 Quick Start

Installation

pip install polarscope

That's it! The main dependencies (Polars, Great Tables) will be installed automatically.

Basic Usage

import polars as pl
import polarscope as ps
from polarscope.datasets import titanic

# Use a built-in dataset or load your own
df = titanic()
# df = pl.read_csv("your_data.csv")

# Get basic data summary
ps.xray(df)

# More detailed analysis
ps.xray(df, expanded=True)

# Custom title and correlation analysis
ps.xray(df, title="My Data Analysis", corr_target="Survived")

Available Options

# Some useful parameters for xray()
ps.xray(
    df,
    expanded=True,              # Show more statistics
    title="Custom Title",       # Custom title for output
    corr_target="column_name",  # Show correlations with this column
    decimals=2,                 # Number formatting
    great_tables=False          # Return DataFrame instead of formatted table
)

🚧 Current Status

Early development - expect bugs and missing features!

  • Main focus is on the xray() function
  • Uses Polars for data processing (no Pandas dependency)
  • Great Tables for nice-looking output
  • Other functions are basic implementations or placeholders

📋 What Works

  • ✅ Basic data inspection with xray()
  • ✅ Built-in datasets (titanic, diabetes)
  • ✅ Great Tables formatting
  • ✅ Custom titles and correlation analysis
  • ⚠️ Some plotting functions (limited)
  • ⚠️ Some cleaning utilities (basic)

🤝 Contributing

This is a small project, but contributions are welcome! Feel free to report bugs or suggest improvements.


📄 License

MIT License - see LICENSE file for details.


🙏 Acknowledgments

Inspired by klib and built with great_tables.


🔬 A simple tool for basic Polars data inspection.

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

polarscope-1.3.2.tar.gz (52.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polarscope-1.3.2-py3-none-any.whl (53.4 kB view details)

Uploaded Python 3

File details

Details for the file polarscope-1.3.2.tar.gz.

File metadata

  • Download URL: polarscope-1.3.2.tar.gz
  • Upload date:
  • Size: 52.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for polarscope-1.3.2.tar.gz
Algorithm Hash digest
SHA256 a0b60e55623033fae54706a0e4304668bc79069f483d2968c7ffc8198ad074c9
MD5 6f4651bbfa274feabc2f55baa5b2a07e
BLAKE2b-256 d70b82c85b4167b530cda280009c90f6dfbdffc276b54c233e602f79a8e50bca

See more details on using hashes here.

File details

Details for the file polarscope-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: polarscope-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 53.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for polarscope-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5864ad5df03e880a7cae0535a89d49a69ad7771f2f3a4cf6a9f9c64b9eecbbc3
MD5 c16d4e22e3d4486f478ac2e92db3eac7
BLAKE2b-256 2e9f592839292e0878410cec93f15b7a30873b84e193f0c0d05b7908d4651fa5

See more details on using hashes here.

Supported by

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