Horje
To convert categorical data to numerical Code Example
how to convert categorical data to numerical data in python
obj_df["body_style"] = obj_df["body_style"].astype('category')
obj_df.dtypes
Source: pbpython.com
To convert categorical data to numerical
cat_cols = ['Item_Identifier', 'Item_Fat_Content', 'Item_Type', 'Outlet_Identifier', 
         'Outlet_Size', 'Outlet_Location_Type', 'Outlet_Type', 'Item_Type_Combined']
enc = LabelEncoder()

for col in cat_cols:
    train[col] = train[col].astype('str')
    test[col] = test[col].astype('str')
    train[col] = enc.fit_transform(train[col])
    test[col] = enc.transform(test[col])




Css

Related
css play button on image Code Example css play button on image Code Example
how to use css transform matrix Code Example how to use css transform matrix Code Example
css orientations Code Example css orientations Code Example
html datalist css style Code Example html datalist css style Code Example
css properties Code Example css properties Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10