csvtools
csvtools copied to clipboard
csvlook implementation
Great stuff!
What are your thoughts on a csvlook implementation? I imagine it would read the first 100 rows or so and find out the max length of each column and then pad the remaining data to the same width. If any following records go over, then so be it.
Hi,
Not sure what you mean with a csvlook program? Is there a gnu tool equivalent?
At the moment there is no calculation of the width of the columns, and padding is not allowed per standard. Or do you mean for files with unstable number of columns?
My goal is to be standard complaint and map common GNU tools to it.
I don't think there's a gnu tool equivalent but it's a part of csvkit: csvlook
Ah, interesting, I can't really imagine that you want to view MBs of csv in this way? looks like a nice tool to inspect some part of the data?
I agree, that this could be an interesting tool to add, we could decide the width of the columns on the first MB (or whatever buffer size used) and use that, but that's not exactly correct...
perhaps a csvhead
tool would be more what you'd want..
I've thought about it a bit more, and it could indeed work. The first buffer (1MB) is used to calculate column widths, and the rows are limited to those widths.
Great! I think it would work in conjunction with csvgrep and csvcut to take a look at large files quickly and easily. This just sparked the idea for a csvhead/csvtail which would both preserve the header line.
If you want, I'll be happy to take a first crack at csvlook this week.
awesome! looking forward to your pull request ;)
On Mon, 20 Jun 2016 at 16:22 Neville Kadwa [email protected] wrote:
Great! I think it would work in conjunction with csvgrep and csvcut to take a look at large files quickly and easily. This just sparked the idea for a csvhead/csvtail which would both preserve the header line.
If you want, I'll be happy to take a first crack at csvlook this week.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/DavyLandman/csvtools/issues/9#issuecomment-227156754, or mute the thread https://github.com/notifications/unsubscribe/AAK9ky8hTqZu-3GsbfazZmISu38O4qK_ks5qNqI-gaJpZM4IRYQM .