compat.py 262 B

12345678910111213
  1. """
  2. Helpers for sharing tests between DataFrame/Series
  3. """
  4. from pandas import DataFrame
  5. def get_dtype(obj):
  6. if isinstance(obj, DataFrame):
  7. # Note: we are assuming only one column
  8. return obj.dtypes.iat[0]
  9. else:
  10. return obj.dtype