Issue 1:
With the following, I can plot work, but I can not plot nowork. I can't see any clear difference between the two resulting dataframes. I also get the issue when trying to slice use .loc and range of labels.

work = mp_stats_unstack.xs(0, level='CPU', axis=1).iloc[:,[x for x in range(48,63)]]
nowork = mp_stats_unstack.xs(0, level='CPU', axis=1).iloc[:,48:63]
nowork
<class 'pandas.core.frame.DataFrame'>
Int64Index: 1848 entries, 1378842548 to 1378844396
Data columns (total 15 columns):
NMI/s 1848 non-null values
LOC/s 1848 non-null values
SPU/s 1848 non-null values
PMI/s 1848 non-null values
IWI/s 1848 non-null values
RTR/s 1848 non-null values
RES/s 1848 non-null values
CAL/s 1848 non-null values
TLB/s 1848 non-null values
TRM/s 1848 non-null values
THR/s 1848 non-null values
MCE/s 1848 non-null values
MCP/s 1848 non-null values
ERR/s 1848 non-null values
MIS/s 1848 non-null values
dtypes: float64(15)

work
<class 'pandas.core.frame.DataFrame'>
Int64Index: 1848 entries, 1378842548 to 1378844396
Data columns (total 15 columns):
NMI/s 1848 non-null values
LOC/s 1848 non-null values
SPU/s 1848 non-null values
PMI/s 1848 non-null values
IWI/s 1848 non-null values
RTR/s 1848 non-null values
RES/s 1848 non-null values
CAL/s 1848 non-null values
TLB/s 1848 non-null values
TRM/s 1848 non-null values
THR/s 1848 non-null values
MCE/s 1848 non-null values
MCP/s 1848 non-null values
ERR/s 1848 non-null values
MIS/s 1848 non-null values
dtypes: float64(15)

nowork.plot()
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-482-b831b20208bb> in <module>()
----> 1 nowork.plot()

/usr/local/lib/python3.3/site-packages/pandas/tools/plotting.py in plot_frame(frame, x, y, subplots, sharex, sharey, use_index, figsize, grid, legend, rot, ax, style, title, xlim, ylim, logx, logy, xticks, yticks, kind, sort_columns, fontsize, secondary_y, **kwds)
1634 logy=logy, sort_columns=sort_columns,
1635 secondary_y=secondary_y, **kwds)
-> 1636 plot_obj.generate()
1637 plot_obj.draw()
1638 if subplots:

/usr/local/lib/python3.3/site-packages/pandas/tools/plotting.py in generate(self)
852 def generate(self):
853 self._args_adjust()
--> 854 self._compute_plot_data()
855 self._setup_subplots()
856 self._make_plot()

/usr/local/lib/python3.3/site-packages/pandas/tools/plotting.py in _compute_plot_data(self)
925 try:
926 # might be an ndframe
--> 927 numeric_data = self.data._get_numeric_data()
928 except AttributeError: # TODO: rm in 0.13 (series-inherit-ndframe)
929 numeric_data = self.data

/usr/local/lib/python3.3/site-packages/pandas/core/frame.py in _get_numeric_data(self)
5291
5292 def _get_numeric_data(self):
-> 5293 return self._constructor(self._data.get_numeric_data(), index=self.index, copy=False)
5294
5295 def _get_bool_data(self):

/usr/local/lib/python3.3/site-packages/pandas/core/internals.py in get_numeric_data(self, copy, type_list, as_blocks)
1398
1399 indexer = np.sort(np.concatenate([b.ref_locs for b in num_blocks]))
-> 1400 new_items = self.items.take(indexer)
1401
1402 new_blocks = []

/usr/local/lib/python3.3/site-packages/pandas/core/index.py in take(self, indexer, axis)
393 """
394 indexer = com._ensure_platform_int(indexer)
--> 395 taken = self.view(np.ndarray).take(indexer)
396 return self._constructor(taken, name=self.name)
397

IndexError: index 15 is out of bounds for axis 0 with size 15

Issue 2:
Code Sample, a copy-pastable example if possible

In [2]: import pandas as pd

In [3]: pd.__version__
Out[3]: '0.23.0rc2'

In [4]: x = pd.DataFrame({'b': [1,2,3]}, index=[1,1,2])

In [5]: x
Out[5]:
b
1 1
1 2
2 3

In [6]: x.first_valid_index()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-baa2c482d9a6> in <module>()
----> 1 x.first_valid_index()

lib/python3.5/site-packages/pandas/core/generic.py in first_valid_index(self)
8881 'klass': 'NDFrame'})
8882 def first_valid_index(self):
-> 8883 return self._find_valid_index('first')
8884
8885 @Appender(_shared_docs['valid_index'] % {'position': 'last',

lib/python3.5/site-packages/pandas/core/generic.py in _find_valid_index(self, how)
8867 # First valid value case
8868 i = is_valid.idxmax()
-> 8869 if not is_valid[i]:
8870 return None
8871 return i

lib/python3.5/site-packages/pandas/core/generic.py in __nonzero__(self)
1572 raise ValueError("The truth value of a {0} is ambiguous. "
1573 "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
-> 1574 .format(self.__class__.__name__))
1575
1576 __bool__ = __nonzero__

ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Problem description

first_valid_index did not raise on a row index with duplicate values on pandas <= 0.22.0

Expected Output

0

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.5.4.final.0

python-bits: 64

OS: Linux

OS-release: 4.1.35-pv-ts2

machine: x86_64

processor:

byteorder: little

LC_ALL: None

LANG: en_US.UTF-8

LOCALE: en_US.UTF-8

pandas: 0.23.0

pytest: 3.2.1

pip: 9.0.1

setuptools: 36.4.0

Cython: None

numpy: 1.12.1

scipy: 0.19.1

pyarrow: 0.8.0

xarray: None

IPython: 6.1.0

sphinx: 1.7.5

patsy: 0.4.1

dateutil: 2.6.1

pytz: 2017.2

blosc: None

bottleneck: None

tables: 3.4.2

numexpr: 2.6.2

feather: None

matplotlib: 2.0.2

openpyxl: None

xlrd: None

xlwt: None

xlsxwriter: None

lxml: None

bs4: 4.6.0

html5lib: 0.9999999

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: None

cc @jreback