Skip to content

API Reference

milisp edited this page Oct 23, 2024 · 1 revision

Panars API Reference

This API Reference provides detailed information on the classes, methods, and functions available in the Panars library.

DataFrame

The DataFrame class is the primary data structure in Panars, similar to Pandas' DataFrame.

Creation

pa.DataFrame(data: Dict[str, List])

Creates a new DataFrame from a dictionary of lists.

Methods

head()

DataFrame.head(n: int = 5) -> DataFrame

Returns the first n rows of the DataFrame.

info()

DataFrame.info() -> None

Prints a concise summary of the DataFrame, including column names, non-null counts, and data types.

describe()

DataFrame.describe() -> DataFrame

Generates descriptive statistics of the DataFrame's numerical columns.

groupby()

DataFrame.groupby(by: str) -> GroupBy

Groups the DataFrame by the specified column.

sort_values()

DataFrame.sort_values(by: str, ascending: bool = True) -> DataFrame

Sorts the DataFrame by the specified column.

Indexing and Selection

DataFrame[column_name: str] -> Series
DataFrame[boolean_mask: List[bool]] -> DataFrame

Selects data from the DataFrame using column names or boolean masks.

Series

The Series class represents a single column of a DataFrame.

Methods

(Add Series-specific methods here as they become available in the Panars library)

GroupBy

The GroupBy object is created by the groupby() method of a DataFrame.

Methods

agg()

GroupBy.agg(agg_dict: Dict[str, str]) -> DataFrame

Applies aggregation functions to the grouped data.

Utility Functions

(Add any standalone utility functions provided by Panars here)


This API Reference is a work in progress and will be updated as the Panars library evolves. For the most up-to-date information, please refer to the official Panars documentation or source code.

Clone this wiki locally