Skip to content

Commit

Permalink
Add fillna test with nan and null
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Jun 5, 2024
1 parent be66fde commit 0d74275
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/cudf/cudf/tests/test_replace.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import numpy as np
import pandas as pd
import pyarrow as pa
import pytest

import cudf
Expand Down Expand Up @@ -1370,3 +1371,10 @@ def test_fillna_columns_multiindex():
actual = gdf.fillna(10)

assert_eq(expected, actual)


def test_fillna_nan_and_null():
ser = cudf.Series(pa.array([float("nan"), None, 1.1]), nan_as_null=False)
result = ser.fillna(2.2)
expected = cudf.Series([2.2, 2.2, 1.1])
assert_eq(result, expected)

0 comments on commit 0d74275

Please sign in to comment.