Answers for "pandas check if dataframe or series"

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 series

type(x) is pd.DataFrame		# NO
type(x) == pd.DataFrame		# NO
isinstance(x, pd.DataFrame) # YES
Posted by: Guest on January-22-2021

Code answers related to "pandas check if dataframe or series"

Python Answers by Framework

Browse Popular Code Answers by Language