def resample(obj, kind=None, **kwds):
    tg = TimeGrouper(**kwds)
    return tg._get_resampler(obj, kind=kind)
create a TimeGrouper and return our resampler
dataset/ETHPy150Open pydata/pandas/pandas/tseries/resample.py/resample