Manipulation/selection#

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

Return the k smallest elements.

DataFrame.clear([n])

Create an empty (n=0) or n-row null-filled (n>0) copy of the DataFrame.

DataFrame.clone()

Cheap deepcopy/clone.

DataFrame.drop(columns, *more_columns)

Remove columns from the dataframe.

DataFrame.drop_in_place(name)

Drop a single column in-place and return the dropped column.

DataFrame.drop_nulls([subset])

Drop all rows that contain null values.

DataFrame.explode(columns, *more_columns)

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

DataFrame.extend(other)

Extend the memory backed by this DataFrame with the values from other.

DataFrame.fill_nan(value)

Fill floating point NaN values by an Expression evaluation.

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

Fill null values using the specified value or strategy.

DataFrame.filter(predicate)

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

DataFrame.find_idx_by_name(name)

Find the index of a column by name.

DataFrame.get_column(name)

Get a single column as Series by name.

DataFrame.get_columns()

Get the DataFrame as a List of Series.

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

Start a groupby operation.

DataFrame.groupby_dynamic(index_column, *, every)

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

DataFrame.groupby_rolling(index_column, *, ...)

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

DataFrame.head([n])

Get the first n rows.

DataFrame.hstack(columns, *[, in_place])

Return a new DataFrame grown horizontally by stacking multiple Series to it.

DataFrame.insert_at_idx(index, series)

Insert a Series at a certain column index.

DataFrame.interpolate()

Interpolate intermediate values.

DataFrame.item([row, column])

Return the dataframe as a scalar, or return the element at the given row/column.

DataFrame.iter_rows()

Returns an iterator over the DataFrame of rows of python-native values.

DataFrame.iter_slices([n_rows])

Returns a non-copying iterator of slices over the underlying DataFrame.

DataFrame.join(other[, on, how, left_on, ...])

Join in SQL-like fashion.

DataFrame.join_asof(other, *[, left_on, ...])

Perform an asof join.

DataFrame.limit([n])

Get the first n rows.

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

Unpivot a DataFrame from wide to long format.

DataFrame.merge_sorted(other, key)

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

DataFrame.partition_by()

Group by the given columns and return the groups as separate dataframes.

DataFrame.pipe(function, *args, **kwargs)

Offers a structured way to apply a sequence of user-defined functions (UDFs).

DataFrame.pivot(values, index, columns[, ...])

Create a spreadsheet-style pivot table as a DataFrame.

DataFrame.rechunk()

Rechunk the data in this DataFrame to a contiguous allocation.

DataFrame.rename(mapping)

Rename column names.

DataFrame.replace(column, new_column)

Replace a column by a new Series.

DataFrame.replace_at_idx(index, series)

Replace a column at an index location.

DataFrame.reverse()

Reverse the DataFrame.

DataFrame.row()

Get the values of a single row, either by index or by predicate.

DataFrame.rows()

Returns all data in the DataFrame as a list of rows of python-native values.

DataFrame.rows_by_key(key, *[, named, ...])

Returns DataFrame data as a keyed dictionary of python-native values.

DataFrame.sample([n, fraction, ...])

Sample from this DataFrame.

DataFrame.select(*exprs, **named_exprs)

Select columns from this DataFrame.

DataFrame.select_seq(*exprs, **named_exprs)

Select columns from this LazyFrame.

DataFrame.set_sorted(column, *more_columns)

Indicate that one or multiple columns are sorted.

DataFrame.shift(periods)

Shift values by the given period.

DataFrame.shift_and_fill(fill_value, *[, ...])

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

DataFrame.shrink_to_fit(*[, in_place])

Shrink DataFrame memory usage.

DataFrame.slice(offset[, length])

Get a slice of this DataFrame.

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

Sort the dataframe by the given columns.

DataFrame.tail([n])

Get the last n rows.

DataFrame.take_every(n)

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

DataFrame.top_k(k, *, by[, descending, ...])

Return the k largest elements.

DataFrame.to_dummies([columns, separator, ...])

Convert categorical variables into dummy/indicator variables.

DataFrame.to_series([index])

Select column as Series at index location.

DataFrame.transpose(*[, include_header, ...])

Transpose a DataFrame over the diagonal.

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

Drop duplicate rows from this dataframe.

DataFrame.unnest(columns, *more_columns)

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

DataFrame.unstack(step[, how, columns, ...])

Unstack a long table to a wide form without doing an aggregation.

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

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

DataFrame.upsample(time_column, *, every[, ...])

Upsample a DataFrame at a regular frequency.

DataFrame.vstack(other, *[, in_place])

Grow this DataFrame vertically by stacking a DataFrame to it.

DataFrame.with_columns(*exprs, **named_exprs)

Add columns to this DataFrame.

DataFrame.with_columns_seq(*exprs, **named_exprs)

Add columns to this DataFrame.

DataFrame.with_row_count([name, offset])

Add a column at index 0 that counts the rows.