numerics = ['int16', 'int32', 'int64', 'float16', 'float32', 'float64'] numeric_df = df.select_dtypes(include=numerics) len(numeric_df.columns)