milisp / panars

Polars to Pandas Wrapper
GNU General Public License v3.0
0 stars 0 forks source link

panars: Polars with Pandas-like Interface

Panars is a powerful wrapper that brings the familiar Pandas API to Polars, combining the best of both worlds: Polars' speed and efficiency with Pandas' user-friendly interface.

Key Features

Installation

pip install panars

Quick Start

import panars as pa

# Create a DataFrame
df = pa.DataFrame({
    "A": [1, 2, 3, 4],
    "B": [5, 6, 7, 8],
    "C": [1, 1, 2, 2]
})

# Familiar Pandas operations
print(df.head())
print(df.groupby("C").sum())
print(df.filter(df["A"] > 2))

# Efficient data manipulation
result = (df.groupby(["C"])
            .agg({"A": ["mean", "sum"], "B": ["min", "max"]})
            .sort_values("C"))
print(result)

Why panars?

  1. Familiar Syntax: Write Polars code using Pandas conventions you already know.
  2. Performance Boost: Gain Polars' speed advantages without learning a new API.
  3. Gradual Migration: Easily port existing Pandas projects to Polars over time.
  4. Community-Driven: Open-source project welcoming contributions and feedback.

Documentation

For detailed usage instructions and API reference, visit our documentation.

ToDo some api

dataframe

IO

Data manipulations

Top-level missing data

Top-level dealing with datetimelike dat

info

groupby

other

Contributing

We welcome contributions! Please see our Contributing Guide for more details.

License

Panars is released under the MIT License. See the LICENSE file for details.