Manipulation/selection#

LazyFrame.bottom_k(k, *, by[, descending, ...])

Return the k smallest elements.

LazyFrame.clear([n])

Create an empty copy of the current LazyFrame, with zero to 'n' rows.

LazyFrame.clone()

Very cheap deepcopy/clone.

LazyFrame.drop(columns, *more_columns)

Remove columns from the dataframe.

LazyFrame.drop_nulls([subset])

Drop all rows that contain null values.

LazyFrame.explode(columns, *more_columns)

Explode the dataframe to long format by exploding the given columns.

LazyFrame.fill_nan(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 LazyFrame based on a predicate expression.

LazyFrame.first()

Get the first row of the DataFrame.

LazyFrame.groupby(by, *more_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, Int32, or Int64 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[, on, how, left_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.merge_sorted(other, key)

Take two sorted DataFrames and merge them by the sorted key.

LazyFrame.rename(mapping)

Rename column names.

LazyFrame.reverse()

Reverse the DataFrame.

LazyFrame.select(*exprs, **named_exprs)

Select columns from this LazyFrame.

LazyFrame.select_seq(*exprs, **named_exprs)

Select columns from this LazyFrame.

LazyFrame.set_sorted(column, *more_columns)

Indicate that one or multiple columns are sorted.

LazyFrame.shift(periods)

Shift the values by a given period.

LazyFrame.shift_and_fill(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, *more_by[, descending, ...])

Sort the dataframe by the given columns.

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.top_k(k, *, by[, descending, ...])

Return the k largest elements.

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

Drop duplicate rows from this dataframe.

LazyFrame.unnest(columns, *more_columns)

Decompose struct columns into separate columns for each of their fields.

LazyFrame.update(other[, on, how])

Update the values in this LazyFrame with the non-null values in other.

LazyFrame.with_columns(*exprs, **named_exprs)

Add columns to this DataFrame.

LazyFrame.with_columns_seq(*exprs, **named_exprs)

Add columns to this 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.