after resample the data types change to float64, is it possible to keep the input type, uint and uint64 in this example?

df=pd.DataFrame([[1,2],[5,6],[2,3]],columns=['a','b'])
df=df.set_index(pd.DatetimeIndex(pd.to_datetime(df.a,unit='s')))
df.b=df.b.astype(np.uint64)
print(df.info())
df2=df.resample('5s')
print(df2.info())

===

<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 3 entries, 1970-01-01 00:00:01 to 1970-01-01 00:00:02
Data columns (total 2 columns):
a    3 non-null int64
b    3 non-null uint64
dtypes: int64(1), uint64(1)
memory usage: 72.0 bytes
None
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 2 entries, 1970-01-01 00:00:00 to 1970-01-01 00:00:05
Freq: 5S
Data columns (total 2 columns):
a    2 non-null float64
b    2 non-null float64
dtypes: float64(2)
memory usage: 48.0 bytes
None

Comment From: jreback

df2 is a Resampler, which is part of a resample operation. Calling .info() is just for backward compat (and will be removed in 0.22.0 anyhow).

You actually need to perform an operation. The operations determinate dtype preservation, most often they are in fact converted to float; .sum() does try to preserve.

In [26]: df.resample('5s').sum().info()
<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 2 entries, 1970-01-01 00:00:00 to 1970-01-01 00:00:05
Freq: 5S
Data columns (total 2 columns):
a    2 non-null int64
b    2 non-null uint64
dtypes: int64(1), uint64(1)
memory usage: 48.0 bytes