Skip to content

add test for fillna with column #39323

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pandas/tests/series/methods/test_fillna.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@


class TestSeriesFillNA:
def test_fillna_column(self):
series1 = np.random.randint(5,30,size=13)
series2 = np.random.randint(5, 30, size=13)
series2[-1] = np.nan
series2[3] = pd.NaT
series2_backup = series2.copy()
series2.fillna(value=series1, inplace=True)
assert series2 != series2_backup
assert not any(series2.isna())

def test_fillna_nat(self):
series = Series([0, 1, 2, NaT.value], dtype="M8[ns]")

Expand Down