csvkit icon indicating copy to clipboard operation
csvkit copied to clipboard

[WIP] if csvstack files have headers, union the headers and align data

Open fgregg opened this issue 4 years ago • 2 comments

This PR will address #245. If the files input to csvstack have headers, then csvstack will create a header that is the union of those headers and align the data to those headers.

Todo

  • [ ] handle case where one of the input files is stdin
  • [ ] write tests for new functionality

fgregg avatar Sep 26 '21 19:09 fgregg

@jpmckinney , if you'd like to take an initial look and see if this approach is to your liking, that would be great. Feel free to wait until tests (and new test are written too).

In particular, i tried to match the current style of csvstack. If you'd like a more modular approach, lmk.

fgregg avatar Sep 26 '21 19:09 fgregg

Looks good from a quick read! If you think a more modular approach would be easier to read and/or maintain, I'm happy to follow that approach.

jpmckinney avatar Oct 08 '21 17:10 jpmckinney

@jpmckinney, two years later. i think is is ready for your real review.

fgregg avatar Feb 21 '23 21:02 fgregg

Thank you! I added a commit but couldn't push to this branch, so I've opened #1193.

jpmckinney avatar Feb 22 '23 18:02 jpmckinney

1.1.1 is now released with this feature 🎉

jpmckinney avatar Feb 22 '23 18:02 jpmckinney