Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in DataFrame.rfloordiv when alignment for different columns and index. #27464

TomAugspurger opened this issue Jul 19, 2019 · 1 comment


Copy link

@TomAugspurger TomAugspurger commented Jul 19, 2019

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)
     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)
     A    B
0  inf  1.0
1  1.0  1.0
2  0.0  1.0

cc @jbrockmendel

Copy link

@jbrockmendel jbrockmendel commented Jul 19, 2019

Looks like we get the expected result if we do the same with a.astype(np.float64)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants