sohamghosh1
3/23/2019 - 4:39 PM

Define data types #data_loading

Define data types #data_loading

# define the dtypes in a dictionary for all features
# pass dtypes parameter in pd.read_csv
numerics = ['int8', 'int16', 'int32', 'int64', 'float16', 'float32', 'float64']
numerical_columns = [c for c,v in dtypes.items() if v in numerics]
categorical_columns = [c for c,v in dtypes.items() if v not in numerics]