<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd
empty_frame=pd.read_excel('pandas/tests/io/data/test1.xlsx', parse_cols=['A','B','C'])
print(empty_frame)
useful_frame=pd.read_csv('pandas/tests/io/data/test1.csv', usecols=['A','B','C'])
print(useful_frame)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-s1">empty_frame</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-en">read_excel</span>(<span class="pl-s">'pandas/tests/io/data/test1.xlsx'</span>, <span class="pl-s1">parse_cols</span><span class="pl-c1">=</span>[<span class="pl-s">'A'</span>,<span class="pl-s">'B'</span>,<span class="pl-s">'C'</span>])
<span class="pl-en">print</span>(<span class="pl-s1">empty_frame</span>)
<span class="pl-s1">useful_frame</span><span class="pl-c1">=</span><span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">'pandas/tests/io/data/test1.csv'</span>, <span class="pl-s1">usecols</span><span class="pl-c1">=</span>[<span class="pl-s">'A'</span>,<span class="pl-s">'B'</span>,<span class="pl-s">'C'</span>])
<span class="pl-en">print</span>(<span class="pl-s1">useful_frame</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">based on making the argument naming consistent for various <code class="notranslate">read_*</code> functions (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="20073572" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/4988" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/4988/hovercard" href="https://github.com/pandas-dev/pandas/issues/4988">#4988</a>), the functionality should also be consistent as well.  ideally, keeping the read_excel ability to parse a string as well.  a continuation of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="231183533" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/16488" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/16488/hovercard" href="https://github.com/pandas-dev/pandas/pull/16488">#16488</a>.</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">expected output to using <code class="notranslate">parse_col=</code>/<code class="notranslate">usecols=['A','B','C']</code> is a dataFrame containing the data in excel columns A, B, &amp; C.</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.4.5.final.0
python-bits: 64
OS: Darwin
OS-release: 16.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
<p dir="auto">pandas: 0.19.2<br>
nose: None<br>
pip: 9.0.1<br>
setuptools: 27.2.0<br>
Cython: 0.25.2<br>
numpy: 1.11.3<br>
scipy: 0.18.1<br>
statsmodels: None<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.5.1<br>
patsy: 0.4.1<br>
dateutil: 2.6.0<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: 3.3.0<br>
numexpr: 2.6.1<br>
matplotlib: 2.0.0<br>
openpyxl: 2.4.1<br>
xlrd: 1.0.0<br>
xlwt: 1.2.0<br>
xlsxwriter: 0.9.6<br>
lxml: 3.7.2<br>
bs4: 4.3.2<br>
html5lib: 0.999<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.1.5<br>
pymysql: 0.7.9.None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
boto: None<br>
pandas_datareader: None</p>
</details>
<p dir="auto"><em>edit: behavior with DataFrame[sparse]</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [68]: a=np.zeros(shape=(5,5))

In [69]: pd.DataFrame(a).apply(lambda x: pd.SparseArray(x, fill_value=0)).drop_duplicates()
Out[69]:
    0   1   2   3   4
0 NaN NaN NaN NaN NaN
"><pre class="notranslate"><code class="notranslate">In [68]: a=np.zeros(shape=(5,5))

In [69]: pd.DataFrame(a).apply(lambda x: pd.SparseArray(x, fill_value=0)).drop_duplicates()
Out[69]:
    0   1   2   3   4
0 NaN NaN NaN NaN NaN

</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
It seems as if pd.SparseDataFrame().duplicated consistently fails when SparseDataFrame contains the value provided by `default_fill_value` in the data.
When SpraseDataFrame does not contain the default_fill_value everything works fine.
to reproduce, default_fill_value can be anything, either the default NaN or a manually specified one (I chose 0).

Reproduction:

```
In [2]: import pandas as pd

In [3]: import numpy as np

In [4]: a=np.zeros(shape=(5,5))

In [5]: df=pd.SparseDataFrame(a)

In [6]: df.drop_duplicates() # &lt;- This is good
Out[6]:
   0  1  2  3  4
0  0  0  0  0  0

In [8]: df=pd.SparseDataFrame(a, default_fill_value=0)

In [9]: df.drop_duplicates() # &lt;- This should work similarly to [6] but fails instead
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
&lt;ipython-input-9-daf275b6788b&gt; in &lt;module&gt;()
----&gt; 1 df.drop_duplicates()

/usr/local/lib/python2.7/dist-packages/pandas/util/decorators.pyc in wrapper(*args, **kwargs)
     87                 else:
     88                     kwargs[new_arg_name] = new_arg_value
---&gt; 89             return func(*args, **kwargs)
     90         return wrapper
     91     return _deprecate_kwarg

/usr/local/lib/python2.7/dist-packages/pandas/util/decorators.pyc in wrapper(*args, **kwargs)
     87                 else:
     88                     kwargs[new_arg_name] = new_arg_value
---&gt; 89             return func(*args, **kwargs)
     90         return wrapper
     91     return _deprecate_kwarg

/usr/local/lib/python2.7/dist-packages/pandas/core/frame.pyc in drop_duplicates(self, subset, keep, inplace)
   3003         deduplicated : DataFrame
   3004         &quot;&quot;&quot;
-&gt; 3005         duplicated = self.duplicated(subset, keep=keep)
  3006
  3007         if inplace:

/usr/local/lib/python2.7/dist-packages/pandas/util/decorators.pyc in wrapper(*args, **kwargs)
    87                 else:
    88                     kwargs[new_arg_name] = new_arg_value
---&gt; 89             return func(*args, **kwargs)
    90         return wrapper
    91     return _deprecate_kwarg

/usr/local/lib/python2.7/dist-packages/pandas/util/decorators.pyc in wrapper(*args, **kwargs)
    87                 else:
    88                     kwargs[new_arg_name] = new_arg_value
---&gt; 89             return func(*args, **kwargs)
    90         return wrapper
    91     return _deprecate_kwarg

/usr/local/lib/python2.7/dist-packages/pandas/core/frame.pyc in duplicated(self, subset, keep)
  3056
  3057         ids = get_group_index(labels, shape, sort=False, xnull=False)
-&gt; 3058         return Series(duplicated_int64(ids, keep), index=self.index)
  3059
  3060     #----------------------------------------------------------------------

/usr/local/lib/python2.7/dist-packages/pandas/core/series.pyc in __init__(self, data, index, dtype, name, copy, fastpath)
   225                                        raise_cast_failure=True)
   226
--&gt; 227                 data = SingleBlockManager(data, index, fastpath=True)
   228
   229         generic.NDFrame.__init__(self, data, fastpath=True)

/usr/local/lib/python2.7/dist-packages/pandas/core/internals.pyc in __init__(self, block, axis, do_integrity_check, fastpath)
  3734             block = make_block(block,
  3735                                placement=slice(0, len(axis)),
-&gt; 3736                                ndim=1, fastpath=True)
  3737
  3738         self.blocks = [block]

/usr/local/lib/python2.7/dist-packages/pandas/core/internals.pyc in make_block(values, placement, klass, ndim, dtype, fastpath)
  2452
  2453     return klass(values, ndim=ndim, fastpath=fastpath,
-&gt; 2454                  placement=placement)
  2455
  2456

/usr/local/lib/python2.7/dist-packages/pandas/core/internals.pyc in __init__(self, values, placement, ndim, fastpath)
    85             raise ValueError('Wrong number of items passed %d,'
    86                              ' placement implies %d' % (
---&gt; 87                                  len(self.values), len(self.mgr_locs)))
    88
    89     @property

ValueError: Wrong number of items passed 0, placement implies 5
```

show_versions():

```
In [2]: pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Linux
OS-release: 3.16.0-4-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.17.1
nose: 1.3.7
pip: 7.1.2
setuptools: 18.5
Cython: 0.23.4
numpy: 1.10.1
scipy: 0.16.1
statsmodels: None
IPython: 4.0.0
sphinx: 1.3.1
patsy: None
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: None
numexpr: 2.4.6
matplotlib: 1.5.0
openpyxl: None
xlrd: None
xlwt: 1.0.0
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
httplib2: None
apiclient: None
sqlalchemy: 1.0.9
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext lo64)
Jinja2: None
```"><pre class="notranslate"><code class="notranslate">
It seems as if pd.SparseDataFrame().duplicated consistently fails when SparseDataFrame contains the value provided by `default_fill_value` in the data.
When SpraseDataFrame does not contain the default_fill_value everything works fine.
to reproduce, default_fill_value can be anything, either the default NaN or a manually specified one (I chose 0).

Reproduction:

```
In [2]: import pandas as pd

In [3]: import numpy as np

In [4]: a=np.zeros(shape=(5,5))

In [5]: df=pd.SparseDataFrame(a)

In [6]: df.drop_duplicates() # &lt;- This is good
Out[6]:
   0  1  2  3  4
0  0  0  0  0  0

In [8]: df=pd.SparseDataFrame(a, default_fill_value=0)

In [9]: df.drop_duplicates() # &lt;- This should work similarly to [6] but fails instead
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
&lt;ipython-input-9-daf275b6788b&gt; in &lt;module&gt;()
----&gt; 1 df.drop_duplicates()

/usr/local/lib/python2.7/dist-packages/pandas/util/decorators.pyc in wrapper(*args, **kwargs)
     87                 else:
     88                     kwargs[new_arg_name] = new_arg_value
---&gt; 89             return func(*args, **kwargs)
     90         return wrapper
     91     return _deprecate_kwarg

/usr/local/lib/python2.7/dist-packages/pandas/util/decorators.pyc in wrapper(*args, **kwargs)
     87                 else:
     88                     kwargs[new_arg_name] = new_arg_value
---&gt; 89             return func(*args, **kwargs)
     90         return wrapper
     91     return _deprecate_kwarg

/usr/local/lib/python2.7/dist-packages/pandas/core/frame.pyc in drop_duplicates(self, subset, keep, inplace)
   3003         deduplicated : DataFrame
   3004         """
-&gt; 3005         duplicated = self.duplicated(subset, keep=keep)
  3006
  3007         if inplace:

/usr/local/lib/python2.7/dist-packages/pandas/util/decorators.pyc in wrapper(*args, **kwargs)
    87                 else:
    88                     kwargs[new_arg_name] = new_arg_value
---&gt; 89             return func(*args, **kwargs)
    90         return wrapper
    91     return _deprecate_kwarg

/usr/local/lib/python2.7/dist-packages/pandas/util/decorators.pyc in wrapper(*args, **kwargs)
    87                 else:
    88                     kwargs[new_arg_name] = new_arg_value
---&gt; 89             return func(*args, **kwargs)
    90         return wrapper
    91     return _deprecate_kwarg

/usr/local/lib/python2.7/dist-packages/pandas/core/frame.pyc in duplicated(self, subset, keep)
  3056
  3057         ids = get_group_index(labels, shape, sort=False, xnull=False)
-&gt; 3058         return Series(duplicated_int64(ids, keep), index=self.index)
  3059
  3060     #----------------------------------------------------------------------

/usr/local/lib/python2.7/dist-packages/pandas/core/series.pyc in __init__(self, data, index, dtype, name, copy, fastpath)
   225                                        raise_cast_failure=True)
   226
--&gt; 227                 data = SingleBlockManager(data, index, fastpath=True)
   228
   229         generic.NDFrame.__init__(self, data, fastpath=True)

/usr/local/lib/python2.7/dist-packages/pandas/core/internals.pyc in __init__(self, block, axis, do_integrity_check, fastpath)
  3734             block = make_block(block,
  3735                                placement=slice(0, len(axis)),
-&gt; 3736                                ndim=1, fastpath=True)
  3737
  3738         self.blocks = [block]

/usr/local/lib/python2.7/dist-packages/pandas/core/internals.pyc in make_block(values, placement, klass, ndim, dtype, fastpath)
  2452
  2453     return klass(values, ndim=ndim, fastpath=fastpath,
-&gt; 2454                  placement=placement)
  2455
  2456

/usr/local/lib/python2.7/dist-packages/pandas/core/internals.pyc in __init__(self, values, placement, ndim, fastpath)
    85             raise ValueError('Wrong number of items passed %d,'
    86                              ' placement implies %d' % (
---&gt; 87                                  len(self.values), len(self.mgr_locs)))
    88
    89     @property

ValueError: Wrong number of items passed 0, placement implies 5
```

show_versions():

```
In [2]: pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Linux
OS-release: 3.16.0-4-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.17.1
nose: 1.3.7
pip: 7.1.2
setuptools: 18.5
Cython: 0.23.4
numpy: 1.10.1
scipy: 0.16.1
statsmodels: None
IPython: 4.0.0
sphinx: 1.3.1
patsy: None
dateutil: 2.4.2
pytz: 2015.7
blosc: None
bottleneck: None
tables: None
numexpr: 2.4.6
matplotlib: 1.5.0
openpyxl: None
xlrd: None
xlwt: 1.0.0
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
httplib2: None
apiclient: None
sqlalchemy: 1.0.9
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext lo64)
Jinja2: None
```
</code></pre></div>