Bug in DataFrame.rfloordiv when alignment for different columns and index. · Issue #27464 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
I think that .loc[0, 'A']
should be inf.
In [36]: a = pd.DataFrame({"A": [0, 1, 2], 'B': [1.1, None, 1.1]})
In [37]: b = pd.DataFrame({"A": [1.1, 1.2, 1.3]}, index=[0, 2, 3])
In [38]: a.rfloordiv(b, fill_value=1) Out[38]: A B 0 NaN 0.0 1 1.0 NaN 2 0.0 0.0 3 1.0 NaN
to match
In [49]: a.rfloordiv(1.1, fill_value=1) Out[49]: A B 0 inf 1.0 1 1.0 1.0 2 0.0 1.0