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

Designate header row when using from_xls or from_xlsx #7

Closed
rdmurphy opened this issue Mar 28, 2016 · 2 comments
Closed

Designate header row when using from_xls or from_xlsx #7

rdmurphy opened this issue Mar 28, 2016 · 2 comments

Comments

@rdmurphy
Copy link

In our tx_salaries repo, we use csvkit (and by extension, now agate-excel!) to prep Excel files for processing. An extra option we also have — after the conversion has happened — is to peel off rows until we hit the header row. We always know where that header row is, so we can pass that index in and be good to go.

When I was doing some tests with agate-excel directly, I quickly hit that wall. It gets a little funky if an Excel spreadsheet has some useless extra rows before the data.

That sound like something that'd be worth having as part of the package? I imagine it could be another option to be passed into the from_ commands.

table = agate.Table.from_xlsx('i_dont_want_your_extra_rows.xlsx', header_row=4)

The biggest decision to make? Do you use zero-based indexing, or start at 1 like Excel? 😬 (We forget what we picked constantly.)

@jpmckinney
Copy link
Member

Related wireservice/csvkit#669

@jpmckinney
Copy link
Member

Also wireservice/csvkit#336

jpmckinney pushed a commit that referenced this issue Jan 28, 2017
Add skip_lines like Table.from_csv, closes #7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants