Wrong output while checking pandas dtypes

pandas
python

#1

Hello everyone,
I am trying to check how many features are with dtype int64 and float64 in pandas data frame. using select_dtypes() function gives correct output, while dtypes.isin() gives wrong output. Any suggestion how to make it working? Thanks.


#2

Hi @himansu979,

df.isin(["value"]) is to check for values in the dataframe. (reference documentation) . So you will have to save this df.dtypes in a new dataframe adn apply new_df.isin().sum()