CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-datatable

Python package for manipulating 2-dimensional tabular data structures with emphasis on speed and big data support

Pending
Overview
Eval results
Files

row-operations.mddocs/

Row-wise Operations

Element-wise operations across columns within rows for complex transformations and calculations.

Capabilities

Row-wise Aggregation Functions

def rowall(*cols):
    """Row-wise all (logical AND across columns)"""

def rowany(*cols):
    """Row-wise any (logical OR across columns)"""

def rowcount(*cols):
    """Row-wise count of non-missing values"""

def rowsum(*cols):
    """Row-wise sum across columns"""

def rowmean(*cols):
    """Row-wise mean across columns"""

def rowmin(*cols):
    """Row-wise minimum across columns"""

def rowmax(*cols):
    """Row-wise maximum across columns"""

def rowsd(*cols):
    """Row-wise standard deviation across columns"""

def rowfirst(*cols):
    """Row-wise first non-missing value"""

def rowlast(*cols):
    """Row-wise last non-missing value"""

def rowargmin(*cols):
    """Row-wise index of minimum value"""

def rowargmax(*cols):
    """Row-wise index of maximum value"""

Examples

import datatable as dt

DT = dt.Frame({
    'A': [1, 2, None, 4],
    'B': [2, None, 3, 5],
    'C': [3, 4, 5, None]
})

# Row-wise operations
result = DT[:, dt.update(
    sum_abc=dt.rowsum(f.A, f.B, f.C),
    mean_abc=dt.rowmean(f.A, f.B, f.C),
    min_abc=dt.rowmin(f.A, f.B, f.C),
    max_abc=dt.rowmax(f.A, f.B, f.C),
    count_abc=dt.rowcount(f.A, f.B, f.C)
)]

Install with Tessl CLI

npx tessl i tessl/pypi-datatable

docs

core-data-structures.md

data-manipulation.md

expression-system.md

file-io.md

index.md

mathematical-functions.md

reductions-aggregations.md

row-operations.md

set-operations.md

string-operations.md

time-operations.md

type-system.md

tile.json