Operations¶

Meerkat provides a set of data manipulation operations that can be applied on DataFrames and Columns. This page provides an overview of the operations available in Meerkat.

Mapping: map and defer

  • map(): Applies a function to each row of a DataFrame and returns a Column or DataFrame with the resulting values.

  • update(): Same as map(), but adds the new column to the original DataFrame in-place.

  • filter(): Applies a function to each row of a DataFrame and returns a new DataFrame with only the rows for which the function returned True.

Combining: concat and merge

  • concat(): Combines multiple DataFrames by stacking them vertically or horizontally.

  • merge(): Joins two DataFrames based on common columns or indices.

Grouping: groupby and clusterby

  • groupby(): Groups a DataFrame by a specified column(s) and applies a function to each group.

  • clusterby(): Groups a DataFrame by a specified column or index and applies a function to each group, returning a new DataFrame with the resulting values.

  • explainby(): Groups a DataFrame by a specified column or index and returns summary statistics for each group.

Aggregating

  • aggregate(): Applies an aggregation function to each column of a DataFrame.

Sorting and sampling

  • sort(): Sorts a DataFrame by one or more columns.

  • sample(): Returns a new DataFrame with a random sample of rows.