wireservice / wireservice/csvkit

in2csv: Importing messy data

Open
#1,289 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
6.4k
Forks
689
Avg merge
1m
Merged PRs (30d)
1

Description

I have multiple spreadsheets with a few metadata rows before the actual data. This trips up csvkit's automatic header detection. I'm processing them in bulk, so I can't rely on pre-counting the number of metadata lines for each.
In particular, this means that in2csv's behaviour where it automatically fills in the first line expecting it to be the header is counterproductive here -- I'm forced to invoke it as in2csv -H | tail -n+2.
Can in2csv be given an --ignore-missing-headers option or somesuch? I'll be piping it into xan or miller for further cleanup, so I don't need a cleverer handling method than that.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the in2csv command entry point and trace its automatic header-detection path. Implement and document the requested option so spreadsheets with leading metadata rows can be processed in bulk without pre-counting them, then verify the resulting command-line behavior described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.