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

xls.parse: fails to skip lines #4340

Closed
timmie opened this issue Jul 24, 2013 · 7 comments
Closed

xls.parse: fails to skip lines #4340

timmie opened this issue Jul 24, 2013 · 7 comments
Labels
Duplicate Report Duplicate issue or pull request IO Data IO issues that don't fit into a more specific label IO Excel read_excel, to_excel
Milestone

Comments

@timmie
Copy link
Contributor

timmie commented Jul 24, 2013

Hello,
my excel file is like:

  • metadata (10 rows)
  • header (1 row)
  • units (1 row)
  • data (250 rows)

Now, I am trying to read it like:

df = xlsall.parse(sheetname='mydata', skiprows=11, header=10)

But it would not assign the information in row 11 as column labels but rather use the units in row 12 (counting from 1).

What could be the cause?

@timmie
Copy link
Contributor Author

timmie commented Jul 24, 2013

What could make this fail?
it looks like the parser just take the row which is

skiprows -1

@timmie
Copy link
Contributor Author

timmie commented Jul 29, 2013

Confirmed.
Sample code in:
https://github.com/timmie/example_code_data

@jtratner
Copy link
Contributor

If you've figured it out, do you want to try applying it to the pandas
codebase?

On Mon, Jul 29, 2013 at 5:41 AM, timmie notifications@github.com wrote:

Confirmed.
Sample code in:
https://github.com/timmie/example_code_data


Reply to this email directly or view it on GitHubhttps://github.com//issues/4340#issuecomment-21709120
.

@timmie
Copy link
Contributor Author

timmie commented Jul 29, 2013

@jtratner
Sorry, I was not clear. I could only confirm that it occurs. But would need to find out what causes the script to ignoe the header indication.

I found a solution for #4332. Would please check my example code?
I am not sure if such a workaround is accepted.

Else, I'll be happy create a PR

@jtratner
Copy link
Contributor

Definitely. I misunderstood what you meant before.

@jreback
Copy link
Contributor

jreback commented Sep 22, 2013

closing in favor or #4903

@jreback jreback closed this as completed Sep 22, 2013
@timmie
Copy link
Contributor Author

timmie commented Sep 22, 2013

note: will most probably find time next week to finalise these issues with Excel.

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 IO Data IO issues that don't fit into a more specific label IO Excel read_excel, to_excel
Projects
None yet
Development

No branches or pull requests

3 participants