I was wondering if there is an elegant and shorthand way in Pandas DataFrames to select columns by data type (dtype). i.e. Select only int64 columns from a DataFrame.
To elaborate, something along the lines of
df.select_columns(dtype=float64)
Thanks in advance for the help
df.loc[:, df.dtypes == np.float64]
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments