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"

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-11-05
猜你喜欢
  • 2021-09-02
  • 2021-11-06
  • 2022-03-05
  • 2021-12-26
  • 2022-01-29
  • 2022-12-23
相关资源
相似解决方案