create_pandas_statement: Create a chained pandas command string

View source: R/create_pandas_statement.R

create_pandas_statementR Documentation

Create a chained pandas command string

Description

This internal function assembles a Python command string for pandas by chaining together different data manipulation methods. It serves as the central command generator for the package.

Usage

create_pandas_statement(
  df_name,
  filter_str = NULL,
  select_str = NULL,
  sort_by_str = NULL,
  sort_asc_str = NULL,
  assign_str = NULL,
  drop_str = NULL,
  groupby_str = NULL,
  agg_str = NULL,
  head_k = NULL,
  tail_k = NULL
)

Arguments

df_name

A character string for the name of the pandas DataFrame.

filter_str

A string for the .query() method.

select_str

A string for column selection (e.g., ['col1', 'col2']).

sort_by_str

A string for the by argument of .sort_values().

sort_asc_str

A string for the ascending argument of .sort_values().

assign_str

A string for the .assign() method.

drop_str

A string for the .drop() method.

groupby_str

A string for the .groupby() method.

agg_str

A string for the .agg() method.

head_k

Integer for .head(k).

tail_k

Integer for .tail(k).

Value

A character string of the complete, chained pandas command.


rPandas documentation built on April 29, 2026, 1:07 a.m.