Horje
using df.astype to select categorical data and numerical data Code Example
using df.astype to select categorical data and numerical data
df = pd.DataFrame({'vertebrates': ['Bird', 'Bird', 'Mammal', 'Fish', 'Amphibian', 'Reptile', 'Mammal']})

df.vertebrates.astype("category").cat.codes




Python

Related
how to use one with as statement to open two files python Code Example how to use one with as statement to open two files python Code Example
python reverse a string Code Example python reverse a string Code Example
two files with open Code Example two files with open Code Example
python try without except Code Example python try without except Code Example
adding roles discord py Code Example adding roles discord py Code Example

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