Answers for "how to check if pandas series or 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 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 "how to check if pandas series or dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language