Answers for "get only numerical column dataframe"

2

get columns based on dtype pandas

>>df.select_dtypes(include='object').columns

Index(['C', 'D'], dtype='object')
Posted by: Guest on March-16-2021
1

python dataframe get numeric columns

dfnew = df.select_dtypes(include=np.number)
Posted by: Guest on November-19-2020

Code answers related to "get only numerical column dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language