Issue 1:
I am puzzled by the following

logger.debug('Indexes are identical: {}'.format(data_frame.index is categories.index))
logger.debug('Index is unique: {}'.format(data_frame.index.is_unique))
logger.debug('All columns are in data_frame: {}'.format(all(map(lambda x: x in data_frame, columns_regression))))
df_regression = data_frame[columns_regression].join(categories)

2014-06-23 21:02:56,125 DEBUG pmt.portfolio_analytics.attribution.AlphaData - Indexes are identical: True
2014-06-23 21:02:56,141 DEBUG pmt.portfolio_analytics.attribution.AlphaData - Index is unique: True
2014-06-23 21:02:56,142 DEBUG pmt.portfolio_analytics.attribution.AlphaData - All columns are in data_frame: True
Traceback (most recent call last):
File "C:/Users/BKovtunenko/Perforce/bos-perforce01_1666/bkovtunenko_BKOVTUNENKO-D7/aam/branches/boris/pmt/python/pmt/portfolio_analytics/attribution/AlphaData.py", line 1782, in <module>
thresholds_mkt_cap=thresh_mkt_cap)
File "C:/Users/BKovtunenko/Perforce/bos-perforce01_1666/bkovtunenko_BKOVTUNENKO-D7/aam/branches/boris/pmt/python/pmt/portfolio_analytics/attribution/AlphaData.py", line 1640, in save_regression_results
regression_type=regresion_type)
File "C:/Users/BKovtunenko/Perforce/bos-perforce01_1666/bkovtunenko_BKOVTUNENKO-D7/aam/branches/boris/pmt/python/pmt/portfolio_analytics/attribution/AlphaData.py", line 1489, in save_regression_decomposition
df_regression = data_frame[columns_regression].join(categories)
File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 3580, in join
rsuffix=rsuffix, sort=sort)
File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 3594, in _join_compat
suffixes=(lsuffix, rsuffix), sort=sort)
File "C:\Python27\lib\site-packages\pandas\tools\merge.py", line 40, in merge
return op.get_result()
File "C:\Python27\lib\site-packages\pandas\tools\merge.py", line 189, in get_result
ldata, rdata = self._get_merge_data()
File "C:\Python27\lib\site-packages\pandas\tools\merge.py", line 284, in _get_merge_data
copydata=False)
File "C:\Python27\lib\site-packages\pandas\core\internals.py", line 3439, in _maybe_rename_join
to_rename = self.items.intersection(other.items)
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 962, in intersection
indexer = self.get_indexer(other.values)
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 1120, in get_indexer
raise InvalidIndexError('Reindexing only valid with uniquely'
pandas.core.index.InvalidIndexError: Reindexing only valid with uniquely valued Index objects

Process finished with exit code 1

Issue 2:
xref #17282

Code Sample

>>> x.isnull().sum()
0

>>> x.value_counts()
0.000000 693
12.561725 1
13.568112 1
12.521249 1
13.007628 1
6.993961 1
14.815512 1
6.017280 1
12.944714 1
Name: 0, dtype: int64

>>> categorized = pd.qcut(x, 10, duplicates='drop')
>>> categorized.isnull().sum()
0

>>> categorized.cat.categories # Notice how all values of x are contained in the only interval
IntervalIndex([(-0.001, 14.816]]
closed='right',
dtype='interval[float64]')

>>> res = pd.cut(x, categorized.cat.categories)
>>> res.isnull().sum()
701

Copy pastable

x = pd.read_csv('x.csv', header=None).iloc[:, 0] # x.csv is provided in a comment below
categorized = pd.qcut(x, 10, duplicates='drop')
res = pd.cut(x, categorized.cat.categories)
res.isnull().sum()

Problem description

When I use qcut to get the IntervalIndex corresponding to the quantiles of a float64 series, and than use this as the bins of cut on the same float64 series, it doesn't work. It produces a new series with a lot of NaN values, while the original series contained no NaN and all of its values are contained at the interval of IntervalIndex.

Expected Output

The result of both qcut and cut should also be the same, but they are not.

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.6.1.final.0

python-bits: 64

OS: Linux

OS-release: 3.10.0-514.26.2.el7.x86_64

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: None

LANG: en_US.UTF-8

LOCALE: en_US.UTF-8

pandas: 0.20.1

pytest: 3.0.7

pip: 9.0.1

setuptools: 27.2.0

Cython: 0.25.2

numpy: 1.12.1

scipy: 0.19.0

xarray: None

IPython: 5.3.0

sphinx: 1.5.6

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2017.2

blosc: None

bottleneck: 1.2.1

tables: 3.3.0

numexpr: 2.6.2

feather: None

matplotlib: 2.0.2

openpyxl: 2.4.7

xlrd: 1.0.0

xlwt: 1.2.0

xlsxwriter: 0.9.6

lxml: 3.7.3

bs4: 4.6.0

html5lib: 0.9999999

sqlalchemy: 1.1.9

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

pandas_gbq: None

pandas_datareader: None