Skip to content

Commit d215c7b

Browse files
ganevgvjreback
authored andcommitted
black reformatting (#29342)
1 parent 825f811 commit d215c7b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/series/test_dtypes.py

+10
Original file line numberDiff line numberDiff line change
@@ -518,3 +518,13 @@ def test_values_compatibility(self, data):
518518
result = pd.Series(data).values
519519
expected = np.array(data.astype(object))
520520
tm.assert_numpy_array_equal(result, expected)
521+
522+
def test_reindex_astype_order_consistency(self):
523+
# GH 17444
524+
s = Series([1, 2, 3], index=[2, 0, 1])
525+
new_index = [0, 1, 2]
526+
temp_dtype = "category"
527+
new_dtype = str
528+
s1 = s.reindex(new_index).astype(temp_dtype).astype(new_dtype)
529+
s2 = s.astype(temp_dtype).reindex(new_index).astype(new_dtype)
530+
tm.assert_series_equal(s1, s2)

0 commit comments

Comments
 (0)