clarite.modify.make_continuous¶
-
clarite.modify.
make_continuous
(data: pandas.core.frame.DataFrame, skip: Union[str, List[str], NoneType] = None, only: Union[str, List[str], NoneType] = None)¶ Set variable types as Numeric
Converts the type to numeric
Parameters: - data: pd.DataFrame or pd.Series
Data to be processed
- skip: str, list or None (default is None)
List of variables that should not be made continuous
- only: str, list or None (default is None)
List of variables that are the only ones to be made continuous
Returns: - data: pd.DataFrame
DataFrame with the same data but validated and converted to numeric types
Examples
>>> import clarite >>> df = clarite.modify.make_continuous(df) ================================================================================ Running make_categorical -------------------------------------------------------------------------------- Set 128 of 128 variable(s) as continuous, each with 4,321 observations