https://stackoverflow.com/questions/14808945/check-if-variable-is-dataframe
Use the built-in isinstance()
function.
1 import pandas as pd 2 3 def f(var): 4 if isinstance(var, pd.DataFrame): 5 print "do stuff"
https://stackoverflow.com/questions/14808945/check-if-variable-is-dataframe
Use the built-in isinstance()
function.
1 import pandas as pd 2 3 def f(var): 4 if isinstance(var, pd.DataFrame): 5 print "do stuff"