Skip to content

Commit bcaab67

Browse files
committed
Review (jreback)
1 parent f4c51ff commit bcaab67

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
@@ -3901,6 +3901,7 @@ def set_index(self, keys, drop=True, append=False, inplace=False,
39013901
# if there are any labels that are invalid, we raise a KeyError
39023902
missing = [x for x in col_labels if x not in self]
39033903
raise KeyError('{}'.format(missing))
3904+
39043905
elif len(set(col_labels)) < len(col_labels):
39053906
# if all are valid labels, but there are duplicates
39063907
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)