woodwork.utils.read_csv

woodwork.utils.read_csv(filepath=None, name=None, index=None, time_index=None, semantic_tags=None, logical_types=None, use_standard_tags=True, **kwargs)[source]

Read data from the specified CSV file and return a DataFrame with initialized Woodwork typing information.

Parameters
  • filepath (str) – A valid string path to the file to read

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

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

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

  • semantic_tags (dict, optional) – Dictionary mapping column names in the dataframe to the semantic tags for the column. The keys in the dictionary should be strings that correspond to columns in the underlying dataframe. 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.

  • logical_types (dict[str -> LogicalType], optional) – Dictionary mapping column names in the dataframe to the LogicalType for the column. LogicalTypes will be inferred for any columns not present in the dictionary.

  • use_standard_tags (bool, optional) – If True, will add standard semantic tags to columns based on the inferred or specified logical type for the column. Defaults to True.

  • **kwargs – Additional keyword arguments to pass to the underlying pandas.read_csv function. For more information on available keywords refer to the pandas documentation.

Returns

DataFrame created from the specified CSV file with Woodwork typing information initialized.

Return type

pd.DataFrame