Skip to content
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

CLN GH10559 Rename sheetname variable to sheet_name for consistency #12604

Closed
wants to merge 1 commit into from
Closed

CLN GH10559 Rename sheetname variable to sheet_name for consistency #12604

wants to merge 1 commit into from

Conversation

mandeep
Copy link

@mandeep mandeep commented Mar 13, 2016

@mandeep mandeep closed this Mar 13, 2016
@jreback
Copy link
Contributor

jreback commented Mar 13, 2016

reason you closed this?

@mandeep
Copy link
Author

mandeep commented Mar 14, 2016

Hi jreback, I did not mean to close the pull request. This is my first attempt at contributing and I'm going through some growing pains. I realized as soon as I submitted the request that I had accidentally changed the keyword arguments instead of keeping them as sheetname. I will make another attempt at fixing the issue if that's okay.

@mandeep mandeep reopened this Mar 14, 2016
@jreback
Copy link
Contributor

jreback commented Mar 14, 2016

contributing docs are here

@jreback jreback added the IO Excel read_excel, to_excel label Mar 14, 2016
@@ -72,7 +72,7 @@ def get_writer(engine_name):
raise ValueError("No Excel writer '%s'" % engine_name)


def read_excel(io, sheetname=0, header=0, skiprows=None, skip_footer=0,
def read_excel(io, sheet_name=0, header=0, skiprows=None, skip_footer=0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this will actually need to be deprecated, so re-add sheetname=None. Then if sheetname is not None, you will issue a warning that it is deprecated and reset sheet_name=sheetname.

This way if people pass as positional args it will work, and if they pass as a kwarg then it will show the deprecation warning (but still work).

Pls add a tests for this as well.

@jreback
Copy link
Contributor

jreback commented May 7, 2016

pls reopen if you like to rebase / update

@jreback jreback closed this May 7, 2016
@mandeep
Copy link
Author

mandeep commented Sep 21, 2016

Hi @jreback, sorry for going M.I.A. on this. I want to fix this issue, but I have a few questions. When you say sheetname=None, do you mean you want to change sheetname=0 to sheetname=None? If this is the case, my plan is to change these arguments in read_excel() and _parse_excel() while also adding a deprecation warning. Please let me know your thoughts.

@jreback
Copy link
Contributor

jreback commented Sep 21, 2016

so you rename the arg as you did, then add the deprecated kwarg at the end, e.g. sheetname=None, so then you can pick it up both if its passed positionally (e.g. sheet_name will be set), then you can issue a warning if the sheetname kwarg is set you can issue a warning

@mandeep
Copy link
Author

mandeep commented Sep 27, 2016

@jreback Hi cloned the fork and created a dev environment by using python setup.py develop. When I made the necessary changes, I noticed that all of the tests still passed when they shouldn't have. I read the docs again to see if I missed anything, and asked on IRC, but we couldn't come up with a solution. Is there something I need to be doing with nosetests in order to run a similar test suite to the one on Travis?

Thanks,
Mandeep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minor improvement: Change to_excel "sheet_name" to "sheetname"
2 participants