Make sure `resample` is set to True if `sample_period` is not None.