Skip to content

Commit d2f1e78

Browse files
committed
Review (jreback)
1 parent 637bb3e commit d2f1e78

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pandas/core/frame.py

+1
Original file line numberDiff line numberDiff line change
@@ -3875,6 +3875,7 @@ def set_index(self, keys, drop=True, append=False, inplace=False,
38753875
# if there are any labels that are invalid, we raise a KeyError
38763876
missing = [x for x in col_labels if x not in self]
38773877
raise KeyError('{}'.format(missing))
3878+
38783879
elif len(set(col_labels)) < len(col_labels):
38793880
# if all are valid labels, but there are duplicates
38803881
dup = Series(col_labels)

pandas/tests/frame/test_alter_axes.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020

2121
import pandas.util.testing as tm
2222

23-
from pandas.tests.frame.common import TestData
2423

25-
26-
class TestDataFrameAlterAxes(TestData):
24+
class TestDataFrameAlterAxes():
2725

2826
def test_set_index_directly(self, mixed_frame):
2927
df = mixed_frame

0 commit comments

Comments
 (0)