diff --git a/pandas/tests/series/test_dtypes.py b/pandas/tests/series/test_dtypes.py index afa0377205236..945b89e7c6f99 100644 --- a/pandas/tests/series/test_dtypes.py +++ b/pandas/tests/series/test_dtypes.py @@ -268,7 +268,8 @@ def test_astype_from_categorical(self): def test_astype_categorical_to_other(self): - df = DataFrame({'value': np.random.randint(0, 10000, 100)}) + value = np.random.RandomState(0).randint(0, 10000, 100) + df = DataFrame({'value': value}) labels = ["{0} - {1}".format(i, i + 499) for i in range(0, 10000, 500)] cat_labels = Categorical(labels, labels)