-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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: clip where the bound is a series with NA values returns NA #40420
Comments
This output seems correct to me. Why would an upper bound of |
Hi @dsaxton, please allow me to break my comments in two layers:
|
Ah, I didn't realize [ins] In [7]: s
Out[7]:
0 1
1 2
2 3
dtype: int64
[ins] In [8]: s.clip(0, np.nan)
Out[8]:
0 1
1 2
2 3
dtype: int64
[ins] In [9]: s.clip(0, [np.nan, np.nan, np.nan])
Out[9]:
0 NaN
1 NaN
2 NaN
dtype: float64 However, I think the correct behavior would be the last case where the result is |
Actually, according to an old issue it looks like your preference was actually the original intention: #17276. So if we were to stay true to that then the "correct" behavior would be to not return |
Thanks @dsaxton for the information!
|
My guess would be that always treating Line 7534 in 7af47c9
|
take |
The text was updated successfully, but these errors were encountered: