Skip to content

Implement usecols functionality for read_excel #16510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
abarber4gh opened this issue May 25, 2017 · 4 comments
Closed

Implement usecols functionality for read_excel #16510

abarber4gh opened this issue May 25, 2017 · 4 comments
Labels
Duplicate Report Duplicate issue or pull request

Comments

@abarber4gh
Copy link
Contributor

abarber4gh commented May 25, 2017

Code Sample, a copy-pastable example if possible

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)

Problem description

based on making the argument naming consistent for various read_* functions (#4988), the functionality should also be consistent as well. ideally, keeping the read_excel ability to parse a string as well. a continuation of #16488.

Expected Output

expected output to using parse_col=/usecols=['A','B','C'] is a dataFrame containing the data in excel columns A, B, & C.

Output of pd.show_versions()

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

pandas: 0.19.2
nose: None
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.11.3
scipy: 0.18.1
statsmodels: None
xarray: None
IPython: 5.1.0
sphinx: 1.5.1
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: 1.2.0
tables: 3.3.0
numexpr: 2.6.1
matplotlib: 2.0.0
openpyxl: 2.4.1
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml: 3.7.2
bs4: 4.3.2
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: 1.1.5
pymysql: 0.7.9.None
psycopg2: None
jinja2: 2.9.6
boto: None
pandas_datareader: None

@jreback
Copy link
Contributor

jreback commented May 30, 2017

how is this different than #4988 ?

@abarber4gh
Copy link
Contributor Author

in #4988, @jreback requested "needs to be in a separate PR from the deprecation change." my original PR for #4988 was to change the keyword (from parse_cols to usecols) to match other read_* functions and implement this functionality. this issue was created to separate the kwarg change from the functionality change.

@jreback
Copy link
Contributor

jreback commented Jun 10, 2017

@abarber4gh but that is what the original issue is about. So unless you have something different, this is a duplicate issue.

@gfyoung
Copy link
Member

gfyoung commented Sep 24, 2017

@jreback : I agree. Closing as such unless otherwise noted.

@gfyoung gfyoung closed this as completed Sep 24, 2017
@gfyoung gfyoung added this to the No action milestone Sep 24, 2017
@gfyoung gfyoung added the Duplicate Report Duplicate issue or pull request label Sep 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

3 participants