% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/execute_pandas_statement.R
\name{execute_pandas_statement}
\alias{execute_pandas_statement}
\title{Executes a pandas command string on an R data frame.}
\usage{
execute_pandas_statement(
  r_df,
  py_command,
  table_name = table_name,
  return.as = "result"
)
}
\arguments{
\item{r_df}{An R data.frame.}

\item{py_command}{A character string of Python code using 'df' as a placeholder.}

\item{table_name}{An optional character string. If provided, the generated Python code will replace the internal dataframe name with this string (e.g., \code{"diamonds.query(...)"}). This is useful for seeing the exact, copy-pasteable Python code. Defaults to \code{NULL} (uses \code{"df"}).}

\item{return.as}{What to return: "result", "code", or "all".}
}
\value{
The result of the execution.
}
\description{
This is the core execution engine. It explicitly injects an R data frame
into the Python session, runs a command, retrieves the result, and cleans up.
}
\keyword{internal}
