WoodworkTableAccessor.init(index=None, time_index=None, logical_types=None, make_index=False, already_sorted=False, schema=None, validate=True, use_standard_tags=True, **kwargs)[source]

Initializes Woodwork typing information for a DataFrame.

  • index (str, optional) – Name of the index column.

  • time_index (str, optional) – Name of the time index column.

  • logical_types (dict[str -> LogicalType]) – Dictionary mapping column names in the DataFrame to the LogicalType for the column.

  • make_index (bool, optional) – If True, will create a new unique, numeric index column with the name specified by index and will add the new index column to the supplied DataFrame. If True, the name specified in index cannot match an existing column name in dataframe. If False, the name is specified in index must match a column present in the dataframe. Defaults to False.

  • already_sorted (bool, optional) – Indicates whether the input DataFrame is already sorted on the time index. If False, will sort the dataframe first on the time_index and then on the index (pandas DataFrame only). Defaults to False.

  • name (str, optional) – Name used to identify the DataFrame.

  • semantic_tags (dict, optional) – Dictionary mapping column names in Woodwork to the semantic tags for the column. The keys in the dictionary should be strings that correspond to column names. There are two options for specifying the dictionary values: (str): If only one semantic tag is being set, a single string can be used as a value. (list[str] or set[str]): If multiple tags are being set, a list or set of strings can be used as the value. Semantic tags will be set to an empty set for any column not included in the dictionary.

  • table_metadata (dict[str -> json serializable], optional) – Dictionary containing extra metadata for Woodwork.

  • column_metadata (dict[str -> dict[str -> json serializable]], optional) – Dictionary mapping column names to that column’s metadata dictionary.

  • use_standard_tags (bool, dict[str -> bool], optional) – Determines whether standard semantic tags will be added to columns based on the specified logical type for the column. If a single boolean is supplied, will apply the same use_standard_tags value to all columns. A dictionary can be used to specify use_standard_tags values for individual columns. Unspecified columns will use the default value. Defaults to True.

  • column_descriptions (dict[str -> str], optional) – Dictionary mapping column names to column descriptions.

  • schema (Woodwork.TableSchema, optional) – Typing information to use for the DataFrame instead of performing inference. Any other arguments provided will be ignored. Note that any changes made to the schema object after initialization will propagate to the DataFrame. Similarly, to avoid unintended typing information changes, the same schema object should not be shared between DataFrames.

  • validate (bool, optional) – Whether parameter and data validation should occur. Defaults to True. Warning: Should be set to False only when parameters and data are known to be valid. Any errors resulting from skipping validation with invalid inputs may not be easily understood.