We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e11b2ab commit 80dcec6Copy full SHA for 80dcec6
pandas/tests/io/test_stata.py
@@ -8,6 +8,7 @@
8
import warnings
9
from datetime import datetime
10
from distutils.version import LooseVersion
11
+from collections import OrderedDict
12
13
import numpy as np
14
import pandas as pd
@@ -945,7 +946,7 @@ def test_categorical_order(self, file):
945
946
cols.append((col, pd.Categorical.from_codes(codes, labels)))
947
else:
948
cols.append((col, pd.Series(labels, dtype=np.float32)))
- expected = DataFrame(dict(cols), columns=dict(cols).keys())
949
+ expected = DataFrame(dict(cols), columns=OrderedDict(cols).keys())
950
951
# Read with and with out categoricals, ensure order is identical
952
file = getattr(self, file)
0 commit comments