Skip to content

Commit

Permalink
replace another dict with OrderedDict
Browse files Browse the repository at this point in the history
  • Loading branch information
reidy-p committed Nov 28, 2017
1 parent 896e04b commit 2d4e46b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandas/tests/io/test_stata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import warnings
from datetime import datetime
from distutils.version import LooseVersion
from collections import OrderedDict

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -945,7 +946,7 @@ def test_categorical_order(self, file):
cols.append((col, pd.Categorical.from_codes(codes, labels)))
else:
cols.append((col, pd.Series(labels, dtype=np.float32)))
expected = DataFrame(dict(cols), columns=dict(cols).keys())
expected = DataFrame(dict(cols), columns=OrderedDict(cols).keys())

# Read with and with out categoricals, ensure order is identical
file = getattr(self, file)
Expand Down

0 comments on commit 2d4e46b

Please sign in to comment.