Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/tests/reshape/concat/test_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def test_concat_repeated_keys(keys, integrity):
# GH: 20816
series_list = [Series({"a": 1}), Series({"b": 2}), Series({"c": 3})]
result = concat(series_list, keys=keys, verify_integrity=integrity)
tuples = list(zip(keys, ["a", "b", "c"]))
tuples = list(zip(keys, ["a", "b", "c"], strict=True))
expected = Series([1, 2, 3], index=MultiIndex.from_tuples(tuples))
tm.assert_series_equal(result, expected)

Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/reshape/concat/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_concat_same_index_names(self, name_in1, name_in2, name_in3, name_out):
Index(["c", "d", "e"], name=name_in3),
]
frames = [
DataFrame({c: [0, 1, 2]}, index=i) for i, c in zip(indices, ["x", "y", "z"])
DataFrame({c: [0, 1, 2]}, index=i) for i, c in zip(indices, ["x", "y", "z"], strict=True)
]
result = concat(frames, axis=1)

Expand Down Expand Up @@ -218,7 +218,7 @@ def test_concat_multiindex_with_none_in_index_names(self):
level2 = [1] * 5 + [2] * 2
level1 = [1] * 7
no_name = list(range(5)) + list(range(2))
tuples = list(zip(level2, level1, no_name))
tuples = list(zip(level2, level1, no_name, strict=True))
index = MultiIndex.from_tuples(tuples, names=["level2", "level1", None])
expected = DataFrame({"col": no_name}, index=index, dtype=np.int32)
tm.assert_frame_equal(result, expected)
Expand Down
6 changes: 3 additions & 3 deletions pandas/tests/reshape/test_melt.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def test_simple(self):
"A1980": {0: "d", 1: "e", 2: "f"},
"B1970": {0: 2.5, 1: 1.2, 2: 0.7},
"B1980": {0: 3.2, 1: 1.3, 2: 0.1},
"X": dict(zip(range(3), x)),
"X": dict(zip(range(3), x, strict=True)),
}
)
df["id"] = df.index
Expand Down Expand Up @@ -837,7 +837,7 @@ def test_separating_character(self):
"A.1980": {0: "d", 1: "e", 2: "f"},
"B.1970": {0: 2.5, 1: 1.2, 2: 0.7},
"B.1980": {0: 3.2, 1: 1.3, 2: 0.1},
"X": dict(zip(range(3), x)),
"X": dict(zip(range(3), x, strict=True)),
}
)
df["id"] = df.index
Expand All @@ -861,7 +861,7 @@ def test_escapable_characters(self):
"A(quarterly)1980": {0: "d", 1: "e", 2: "f"},
"B(quarterly)1970": {0: 2.5, 1: 1.2, 2: 0.7},
"B(quarterly)1980": {0: 3.2, 1: 1.3, 2: 0.1},
"X": dict(zip(range(3), x)),
"X": dict(zip(range(3), x, strict=True)),
}
)
df["id"] = df.index
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/reshape/test_qcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,5 @@ def test_qcut_contains(scale, q, precision):
arr = (scale * np.arange(q + 1)).round(precision)
result = qcut(arr, q, precision=precision)

for value, bucket in zip(arr, result):
for value, bucket in zip(arr, result, strict=True):
assert value in bucket
Loading