Skip to content

Commit 2fce51f

Browse files
authored
test: remove transformer test column reorders (#566)
1 parent 512e932 commit 2fce51f

File tree

2 files changed

+25
-150
lines changed

2 files changed

+25
-150
lines changed

tests/system/large/ml/test_compose.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,8 @@ def test_columntransformer_standalone_fit_and_transform(
4545
)
4646
result = transformer.transform(new_penguins_df).to_pandas()
4747

48-
# TODO: bug? feature columns seem to be in nondeterministic random order
49-
# workaround: sort columns by name. Can't repro it in pantheon, so could
50-
# be a bigframes issue...
51-
result = result.reindex(sorted(result.columns), axis=1)
52-
5348
expected = pandas.DataFrame(
5449
{
55-
"min_max_scaled_culmen_length_mm": [0.269, 0.232, 0.210],
5650
"onehotencoded_species": [
5751
[{"index": 1, "value": 1.0}],
5852
[{"index": 1, "value": 1.0}],
@@ -63,6 +57,7 @@ def test_columntransformer_standalone_fit_and_transform(
6357
-0.9945520581113803,
6458
-1.104611490204711,
6559
],
60+
"min_max_scaled_culmen_length_mm": [0.269, 0.232, 0.210],
6661
"standard_scaled_flipper_length_mm": [-0.350044, -1.418336, -0.9198],
6762
},
6863
index=pandas.Index([1633, 1672, 1690], dtype="Int64", name="tag_number"),
@@ -91,11 +86,6 @@ def test_columntransformer_standalone_fit_transform(new_penguins_df):
9186
new_penguins_df[["species", "culmen_length_mm", "flipper_length_mm"]]
9287
).to_pandas()
9388

94-
# TODO: bug? feature columns seem to be in nondeterministic random order
95-
# workaround: sort columns by name. Can't repro it in pantheon, so could
96-
# be a bigframes issue...
97-
result = result.reindex(sorted(result.columns), axis=1)
98-
9989
expected = pandas.DataFrame(
10090
{
10191
"onehotencoded_species": [

0 commit comments

Comments
 (0)