Answers for "python show int columns of dataframe"

1

python dataframe get numeric columns

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

get int64 column pandas

# Use select_dtypes with np.number for select all numeric columns:
cols = [df.select_dtypes([np.number]).columns]
print (list(cols))

# Here is possible specify float64 and int64:
cols = [df.select_dtypes([np.int64,np.float64]).columns]
print (cols)
Posted by: Guest on July-04-2021

Code answers related to "python show int columns of dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language