问题 I have run into a property which I find peculiar about resampling Booleans in pandas . Here is some time series data: import pandas as pd import numpy as np dr = pd.date_range('01-01-2020 5:00', periods=10, freq='H') df = pd.DataFrame({'Bools':[True,True,False,False,False,True,True,np.nan,np.nan,False], "Nums":range(10)}, index=dr) So the data look like: Bools Nums 2020-01-01 05:00:00 True 0 2020-01-01 06:00:00 True 1 2020-01-01 07:00:00 False 2 2020-01-01 08:00:00 False 3 2020-01-01 09:00:00