woodwork.table_accessor.WoodworkTableAccessor.select

WoodworkTableAccessor.select(include=None, exclude=None, return_schema=False)[source]

Create a DataFrame with Woodwork typing information initialized that includes only columns whose Logical Type and semantic tags match conditions specified in the list of types and tags to include or exclude. Values for both include and exclude cannot be provided in a single call.

If no matching columns are found, an empty DataFrame will be returned.

Parameters
  • include (str or LogicalType or list[str or LogicalType]) – Logical types, semantic tags to include in the DataFrame.

  • exclude (str or LogicalType or list[str or LogicalType]) – Logical types, semantic tags to exclude from the DataFrame.

  • return_schema (boolen) – If True, return only the schema for the matching columns. Defaults to False

Returns

The subset of the original DataFrame that matches the conditions specified by include or exclude. Has Woodwork typing information initialized.

Return type

DataFrame