-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add fixed width format support #1515
Comments
Create two commands: tofwf - converts CSV to Fixed Width Format tofwf will work in two modes:
fwf will work in two modes:
|
how about a colspec option, and header space-trimmed taken from the first line ?
|
would you consider also the following use case (stellar catalogues):
the above should be recognizable enough |
@terefang, adding |
looking at some of the fixed width data files i have ... it might be beneficial to have an how would this work ?
|
the second example is even more complex:
thinking about it this also relates to |
Hi @terefang , Even if it has dummy data, it'd make it easier to stand up FWF support in qsv. I can also use them in CI to ensure it works as expected. |
i think a good example is to use an existing debian package that contains the data.
the definitions for col/fieldspec are in the readme file while the actual data is in the .dat file i will try to hunt down other freely available data for the other scenarios. |
hmm ... i have found an even more strange record format, i had to handle in the past. something similar to the second use-case (skip 1 line, header on 2nd line, skip another line), but the record format is more wierd as it adds the twist that the actual data records are delimited by an empty line and has extra spacings around columns. dont know if you would want to handle this case also ? i would give the colspec as:
|
Though not as common, a lot of legacy systems (mainframes, etc.) and even modern data feeds use fixed width format.
See https://stackoverflow.com/questions/7666780/why-are-fixed-width-file-formats-still-in-use and
https://news.ycombinator.com/item?id=38733617
The text was updated successfully, but these errors were encountered: