Functions#

Conversion#

from_arrow(data[, schema, schema_overrides, ...])

Create a DataFrame or Series from an Arrow Table or Array.

from_dataframe(df, *[, allow_copy])

Build a Polars DataFrame from any dataframe supporting the interchange protocol.

from_dict(data[, schema, schema_overrides])

Construct a DataFrame from a dictionary of sequences.

from_dicts(data[, schema, schema_overrides, ...])

Construct a DataFrame from a sequence of dictionaries.

from_numpy(data[, schema, schema_overrides, ...])

Construct a DataFrame from a numpy ndarray.

from_pandas()

Construct a Polars DataFrame or Series from a pandas DataFrame or Series.

from_records(data[, schema, ...])

Construct a DataFrame from a sequence of sequences.

from_repr(tbl)

Utility function that reconstructs a DataFrame or Series from the object's repr.

Miscellaneous#

align_frames(*frames, on[, how, select, ...])

Align a sequence of frames using common values from one or more columns as a key.

concat(items, *[, how, rechunk, parallel])

Combine multiple DataFrames, LazyFrames, or Series into a single object.

Parallelization#

collect_all(lazy_frames, *[, type_coercion, ...])

Collect multiple LazyFrames at the same time.

StringCache#

Note that the StringCache can be used as both a context manager and a decorator, in order to explicitly scope cache lifetime.

StringCache()

Context manager that allows data sources to share the same categorical features.

enable_string_cache(enable)

Enable (or disable) the global string cache.

using_string_cache()

Return the current state of the global string cache (enabled/disabled).