- woodwork.accessor_utils.init_series(series, logical_type=None, semantic_tags=None, use_standard_tags=True, description=None, origin=None, metadata=None)[source]¶
Initializes Woodwork typing information for a series, numpy.ndarray or pd.api.extensions. ExtensionArray, returning a new Series. The dtype of the returned series will be converted to match the dtype associated with the LogicalType.
series (pd.Series, dd.Series, ps.Series, numpy.ndarray or pd.api.extensions.ExtensionArray) – The original series from which to create the Woodwork initialized series.
logical_type (LogicalType or str, optional) – The logical type that should be assigned to the series. If no value is provided, the LogicalType for the series will be inferred.
semantic_tags (str or list or set, optional) – Semantic tags to assign to the series. Defaults to an empty set if not specified. There are two options for specifying the semantic tags: (str) If only one semantic tag is being set, a single string can be passed. (list or set) If multiple tags are being set, a list or set of strings can be passed.
use_standard_tags (bool, optional) – If True, will add standard semantic tags to the series based on the inferred or specified logical type of the series. Defaults to True.
description (str, optional) – Optional text describing the contents of the series.
origin (str, optional) – Optional text specifying origin of the column (i.e. “base” or “engineered”).
metadata (dict[str -> json serializable], optional) – Metadata associated with the series.
A series with Woodwork typing information initialized
- Return type