Answers for "pandas check if object is dataframe"

1

python check if is pandas dataframe

import pandas as pd
isinstance(df, pd.DataFrame)
Posted by: Guest on November-12-2020
0

pandas check if column is object type

for y in agg.columns:
    if(agg[y].dtype == np.float64 or agg[y].dtype == np.int64):
          treat_numeric(agg[y])
    else:
          treat_str(agg[y])
Posted by: Guest on August-26-2020

Code answers related to "pandas check if object is dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language