()
| 1118 | |
| 1119 | |
| 1120 | def test_drop_duplicates_subset(): |
| 1121 | df = pd.DataFrame({"x": [1, 2, 3, 1, 2, 3], "y": ["a", "a", "b", "b", "c", "c"]}) |
| 1122 | ddf = dd.from_pandas(df, npartitions=2) |
| 1123 | |
| 1124 | for kwarg in [{"keep": "first"}, {"keep": "last"}]: |
| 1125 | assert_eq(df.x.drop_duplicates(**kwarg), ddf.x.drop_duplicates(**kwarg)) |
| 1126 | for ss in [["x"], "y", ["x", "y"]]: |
| 1127 | assert_eq( |
| 1128 | df.drop_duplicates(subset=ss, **kwarg), |
| 1129 | ddf.drop_duplicates(subset=ss, **kwarg), |
| 1130 | ) |
| 1131 | assert_eq(df.drop_duplicates(ss, **kwarg), ddf.drop_duplicates(ss, **kwarg)) |
| 1132 | |
| 1133 | |
| 1134 | def test_get_partition(): |
nothing calls this directly
no test coverage detected