Skip to content

Commit

Permalink
feat(clean): support conversion into packed binary format in clean_ip
Browse files Browse the repository at this point in the history
  • Loading branch information
NoirTree committed May 26, 2021
1 parent 37a83b0 commit 7e30f93
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dataprep/tests/clean/test_clean_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ def test_clean_output_packed(df_ips: pd.DataFrame) -> None:
df_clean = clean_ip(df_ips, column="messy_ip", output_format="packed")
df_check = df_ips.copy()
df_check["messy_ip_clean"] = [
b' \x01\r\xb8\x85\xa3\x00\x00\x00\x00\x8a.\x03ps4',
b'\x0c\x03\x04\x05',
b'\xe9\x05\x06\x00',
b" \x01\r\xb8\x85\xa3\x00\x00\x00\x00\x8a.\x03ps4",
b"\x0c\x03\x04\x05",
b"\xe9\x05\x06\x00",
np.nan,
np.nan,
b'\xb1\xc3\x94t',
b'\xfd\xf8\xf5;\x82\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00S',
b"\xb1\xc3\x94t",
b"\xfd\xf8\xf5;\x82\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00S",
]
assert df_check.equals(df_clean)

Expand Down

0 comments on commit 7e30f93

Please sign in to comment.