Manipulation/selection#

LazyFrame.cleared()

Create an empty copy of the current LazyFrame.

LazyFrame.clone()

Very cheap deepcopy/clone.

LazyFrame.drop(columns)

Remove one or multiple columns from a DataFrame.

LazyFrame.drop_nulls([subset])

Drop rows with null values from this LazyFrame.

LazyFrame.explode(columns)

Explode lists to long format.

LazyFrame.fill_nan(fill_value)

Fill floating point NaN values.

LazyFrame.fill_null([value, strategy, ...])

Fill null values using the specified value or strategy.

LazyFrame.filter(predicate)

Filter the rows in the DataFrame based on a predicate expression.

LazyFrame.first()

Get the first row of the DataFrame.

LazyFrame.groupby(by[, maintain_order])

Start a groupby operation.

LazyFrame.groupby_dynamic(index_column, *, every)

Group based on a time value (or index value of type Int32, Int64).

LazyFrame.groupby_rolling(index_column, *, ...)

Create rolling groups based on a time column.

LazyFrame.head([n])

Get the first n rows.

LazyFrame.inspect([fmt])

Inspect a node in the computation graph.

LazyFrame.interpolate()

Interpolate intermediate values.

LazyFrame.join(other[, left_on, right_on, ...])

Add a join operation to the Logical Plan.

LazyFrame.join_asof(other[, left_on, ...])

Perform an asof join.

LazyFrame.last()

Get the last row of the DataFrame.

LazyFrame.limit([n])

Get the first n rows.

LazyFrame.melt([id_vars, value_vars, ...])

Unpivot a DataFrame from wide to long format.

LazyFrame.rename(mapping)

Rename column names.

LazyFrame.reverse()

Reverse the DataFrame.

LazyFrame.select(exprs)

Select columns from this DataFrame.

LazyFrame.shift(periods)

Shift the values by a given period.

LazyFrame.shift_and_fill(periods, fill_value)

Shift the values by a given period and fill the resulting null values.

LazyFrame.slice(offset[, length])

Get a slice of this DataFrame.

LazyFrame.sort(by[, reverse, nulls_last])

Sort the DataFrame.

LazyFrame.tail([n])

Get the last n rows.

LazyFrame.take_every(n)

Take every nth row in the LazyFrame and return as a new LazyFrame.

LazyFrame.unique([maintain_order, subset, keep])

Drop duplicate rows from this DataFrame.

LazyFrame.unnest(names)

Decompose a struct into its fields.

LazyFrame.with_column(column)

Add or overwrite column in a DataFrame.

LazyFrame.with_columns([exprs])

Add or overwrite multiple columns in a DataFrame.

LazyFrame.with_context(other)

Add an external context to the computation graph.

LazyFrame.with_row_count([name, offset])

Add a column at index 0 that counts the rows.