Manipulation/selection#

LazyFrame.approx_n_unique()

Approximate count of unique values.

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

Return the k smallest elements.

LazyFrame.cast(dtypes, *[, strict])

Cast LazyFrame column(s) to the specified dtype(s).

LazyFrame.clear([n])

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

LazyFrame.clone()

Create a copy of this LazyFrame.

LazyFrame.drop(*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(*predicates, **constraints)

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

LazyFrame.first()

Get the first row of the DataFrame.

LazyFrame.gather_every(n[, offset])

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

LazyFrame.group_by(*by[, maintain_order])

Start a group by operation.

LazyFrame.group_by_dynamic(index_column, *, ...)

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

LazyFrame.group_by_rolling(index_column, *, ...)

Create rolling groups based on a time, Int32, or Int64 column.

LazyFrame.groupby(by, *more_by[, maintain_order])

Start a group by 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.rolling(index_column, *, period[, ...])

Create rolling groups based on a temporal or integer column.

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([n, fill_value])

Shift values by the given number of indices.

LazyFrame.shift_and_fill(fill_value, *[, n])

Shift values by the given number of places and fill the resulting null values.

LazyFrame.slice(offset[, length])

Get a slice of this DataFrame.

LazyFrame.sort(by, *more_by[, descending, ...])

Sort the LazyFrame by the given columns.

LazyFrame.tail([n])

Get the last n rows.

LazyFrame.take_every(n[, offset])

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, left_on, ...])

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

LazyFrame.with_columns(*exprs, **named_exprs)

Add columns to this LazyFrame.

LazyFrame.with_columns_seq(*exprs, **named_exprs)

Add columns to this LazyFrame.

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.

LazyFrame.with_row_index([name, offset])

Add a row index as the first column in the LazyFrame.