% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/verbs_filter.R
\name{rp_filter}
\alias{rp_filter}
\title{Filter rows using pandas}
\usage{
rp_filter(.data, filter_expression, table_name = NULL, return.as = "result")
}
\arguments{
\item{.data}{An R data.frame or tibble.}

\item{filter_expression}{The filtering expression, written in R syntax.}

\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{
A \code{data.frame} containing the filtered rows.
}
\description{
Filters a data frame using an R expression translated to pandas.
}
\examples{
\donttest{
if (reticulate::py_available(initialize = TRUE) &&
    reticulate::py_module_available("pandas")) {
      rp_filter(ggplot2::diamonds, carat > 1 & price < 4000)
}
}
}
