Skip to content

Commit

Permalink
TESTS: Ensure missing values are of the same type
Browse files Browse the repository at this point in the history
  • Loading branch information
sebp committed Oct 1, 2023
1 parent 66d97a1 commit 8a22157
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def data_with_missing(self):
def data_drop_all_missing(self):
b, eb = self.binary_with_missing

all_missing = np.repeat([None], len(b))
all_missing = pd.Series([np.nan] * len(b), dtype=object)

input_df = pd.DataFrame({"a_binary": b, "bogus": all_missing})

Expand All @@ -234,7 +234,7 @@ def data_drop_all_missing(self):
def data_retain_all_missing(self):
input_df, _, expected_df = self.data_drop_all_missing()
kwargs = {"allow_drop": False}
expected_df.loc[:, "bogus"] = None
expected_df.loc[:, "bogus"] = pd.Series([np.nan] * expected_df.shape[0], index=expected_df.index, dtype=object)

return input_df, kwargs, expected_df

Expand Down

0 comments on commit 8a22157

Please sign in to comment.