Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

drop colums whoose value are object type in python

import pandas as pd

df = pd.DataFrame({'x': ['a', 'b', 'c'], 'y': [1, 2, 3], 'z': ['d', 'e', 'f']})

df = df.select_dtypes(exclude=['object'])
print(df)
 
PREVIOUS NEXT
Tagged: #drop #colums #whoose #object #type #python
ADD COMMENT
Topic
Name
1+8 =