parallax 0.0.9

Pandas-like dataframes library for data science.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Parallax

Parallax is a powerful pandas/polars-like DataFrames library.

It has good functionality for data analysis, transformation, and time series manipulation.

Usage

import parallax.dataframes;

void main()
{
    auto df = createDataFrame(
        ["name", "age", "salary"],
        ["Alice", "Bob", "Charlie"],
        [25, 30, 35],
        [50000.0, 60000.0, 70000.0]
    );

    df.show();
    auto head = df.head(2);
    auto selected = df.select("name", "salary");
    auto summary = df.describe();
    summary.showPivot();
}

Will output:

DataFrame(3 rows, 3 columns)
┌────────────┬────────────┬────────────┐
│ name       │ age        │ salary     │
├────────────┼────────────┼────────────┤
│ Alice      │ 25         │ 50000      │
│ Bob        │ 30         │ 60000      │
│ Charlie    │ 35         │ 70000      │
└────────────┴────────────┴────────────┘
DataFrame(8 rows, 3 columns)
┌────────────┬────────────┬──────────────┐
│            │ age        │ salary       │
├────────────┼────────────┼──────────────┤
│ count      │ 3          │ 3            │
│ mean       │ 30.000000  │ 60000.000000 │
│ std        │ 5.000000   │ 10000.000000 │
│ min        │ 25.000000  │ 50000.000000 │
│ 25%        │ 27.500000  │ 55000.000000 │
│ 50%        │ 30.000000  │ 60000.000000 │
│ 75%        │ 32.500000  │ 65000.000000 │
│ max        │ 35.000000  │ 70000.000000 │
└────────────┴────────────┴──────────────┘

Core Components

FunctionDescription
create(...)Construct a DataFrame from columns
opIndex(...)Access column(s) or row(s) via indexing
opIndexAssign(...)Assign values via index
rowsNumber of rows
colsNumber of columns
columns()Returns list of column names
shape()Tuple of (rows, cols)
opSlice(...)Slice the DataFrame
head(n)Return the first n rows
tail(n)Return the last n rows
select(...)Select one or more columns
where(predicate)Filter rows by custom condition
groupBy(col)Group by one or more columns
pivotTable(...)Create a pivot table
melt(...)Reshape from wide to long format
meltAllExcept(...)Melt all columns except the specified ones
meltMultiple(...)Melt multiple sets of columns
unmelt(...)Reshape from long to wide format
stack()Stack columns into a single column
unstack()Unstack a stacked column back to wide
crosstab(...)Cross-tabulate two columns
rolling(window)Rolling window statistics
pctChange()Compute percent change
shift(n)Shift rows forward/backward
ffill()Forward fill missing values
bfill()Backward fill missing values
createLags(n)Create lagged versions of columns
describe()Summary statistics
valueCounts(col)Count frequency of values in a column
fillna(value)Replace missing values
drop(cols...)Drop specified columns
dropna()Drop rows with missing data
rename(old => new)Rename columns
apply(fn)Apply a custom function to each row
show()Print the DataFrame
showPivot()Display a pivot table nicely
readCsv(path)Read a CSV file into a DataFrame
toCsv(path)Write a DataFrame to CSV
copy()Deep copy the DataFrame
merge(other)Merge two DataFrames (default is inner join)
sortValues(by)Sort by a specific column
sum()Sum across numeric columns
mean()Mean across numeric columns
max()Max across numeric columns
min()Min across numeric columns
opBinary(...)Binary operations between DataFrames or columns

Time Series & Dates

Function / FeatureDescription
toDatetime(col)Convert string column to datetime
dt(col)Return datetime column accessor
setDatetimeIndex(col)Use datetime column as an index
resample(freq)Resample time series by frequency
betweenDates(start, end)Filter rows between two datetime values
forYear(year)Filter for a specific year
forMonth(month)Filter for a specific month
rollup()Aggregate over time hierarchy
Datetime Accessors (dt(...))
AccessorDescription
dt_year()Extract year
dt_month()Extract month
dt_day()Extract day
dt_dayofweek()Extract day of the week (0–6)
dt_strftime(fmt)Format datetime as string
dt_floor(freq)Round down to nearest freq
dt_ceil(freq)Round up to nearest freq

Modules

ModulePurpose
parallax.dataframesCore DataFrame class and utilities
parallax.columnsColumn types and column management
parallax.csvCSV reader/writer
parallax.valuesGeneric value abstraction (DataValue)
parallax.datetimeDatetime parsing and time logic
Authors:
  • Navid
Dependencies:
ark
Versions:
0.0.9 2025-Jul-25
0.0.8 2025-Jul-25
0.0.7 2025-Jul-25
0.0.6 2025-Jul-25
0.0.5 2025-Jul-24
Show all 11 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Score:
0.3
Short URL:
parallax.dub.pm