10000 TST: Old issues by mroeschke · Pull Request #41607 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

TST: Old issues #41607

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

Merged
merged 12 commits into from
May 24, 2021
Prev Previous commit
Next Next commit
Add test for GH 15613
  • Loading branch information
mroeschke committed May 20, 2021
commit 9839583ffff217a73e54bd2c5571acfa47258112
12 changes: 12 additions & 0 deletions pandas/tests/frame/indexing/test_where.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,3 +745,15 @@ def test_where_bool_comparison():
}
)
tm.assert_frame_equal(result, expected)


def test_where_none_nan_coerce():
# GH 15613
expected = DataFrame(
{
"A": [Timestamp("20130101"), pd.NaT, Timestamp("20130103")],
"B": [1, 2, np.nan],
}
)
result = expected.where(expected.notnull(), None)
tm.assert_frame_equal(result, expected)
0