rolling casts int to float unnecessarily #15599
Labels
Dtype Conversions
Unexpected or buggy dtype conversions
Enhancement
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Numeric Operations
Arithmetic, Comparison, and Logical operations
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Take the following example:
There is no need to cast the ints to floats in this case since no NaNs have to be substituted for missing values when
min_periods=1
. I think it would make sense to treat the casemin_periods<=1
separately to prevent unnecessary type conversions like this one.The text was updated successfully, but these errors were encountered: