Add option for FWF reader and writer
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 506
- Forks
- 150
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 7
Description
The request to handle fixed with format pops up frequently.
Here are the major points of the functionality (this is an ideal state - not all has to be implemented from the start):
- we need reader and writer
- for both reader and writer there be two options (both are needed in different situations)
- byte based width counting
- character based width counting
- column width specification
- both reader and writer should have an "autodetection" of fields width based on a separator passed
- both reader and writer should have an option to be passed a sequence of integers that indicate consecutive field widths
- both reader and writer should have an option to be passed a sequence of integers that indicate consecutive field widths (e.g.
[1,2,3]) - both reader and writer should have an option to be passed a sequence of ranges (e.g.
[1:2, 5:10], overlapping ranges should error) that indicate field widths (this allows for skipping fields - writer should fill gaps with separator)
- writer should allow to specify alignment of contents within field
- reader should optionally strip separator when reading in strings (i.e. field
" ab "should be parsed as"ab"or" ab "depending on this option) - consideration should be given if we allow the last column to have a different width in different rows when we use autodetection or width specified as integers (again - maybe this should be an option - either accept or throw an error)
If something is not clear please comment.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the issue body and separate the proposed fixed-width reader and writer behavior into a smaller initial scope. Resolve the open choices around byte versus character widths, width specification, alignment, stripping separators, and variable final-column widths before implementation. Done should be a clearly agreed subset with corresponding reader and writer behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100