mirror of
https://github.com/kristoferssolo/School.git
synced 2025-10-21 20:10:38 +00:00
14 lines
262 B
Python
14 lines
262 B
Python
"""
|
|
Helpers for sharing tests between DataFrame/Series
|
|
"""
|
|
|
|
from pandas import DataFrame
|
|
|
|
|
|
def get_dtype(obj):
|
|
if isinstance(obj, DataFrame):
|
|
# Note: we are assuming only one column
|
|
return obj.dtypes.iat[0]
|
|
else:
|
|
return obj.dtype
|