I am new to pandas and not familiar with the history of the changes. I have code that I am trying to make work on the latest version of pandas. The last version it works with is 1.1.5. pandas 1.2.0 breaks the code with no other dependencies changing.
The code is doing a SeriesA / SeriesB. SeriesB has some zeros inside. When this division is done with pandas 1.1.5, the zeros division becomes NaNs which is fine. However, when this division is done with pandas 1.2.0, it throws a division by zero error.
Is there some setting I can make that makes the latest pandas treat division by zero with NaNs?
I did some debugging into pandas 1.1.5 vs. pandas 1.2.0. When run with pandas 1.1.5 (which works), the numerator SeriesA is of dtype float64 and the denominator SeriesB is also of dtype float64. However, when run with pandas 1.2.0 (which fails), the numerator SeriesA is of dtype object and the denominator SeriesB is still dtype float64. So success is float64/float64 and failure is object/float64