https://github.com/juliaaplavin/fixedwidthtables.jl
https://github.com/juliaaplavin/fixedwidthtables.jl
file-formats fixed-width tabular-data
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/juliaaplavin/fixedwidthtables.jl
- Owner: JuliaAPlavin
- License: mit
- Created: 2024-02-18T17:56:50.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-08T18:10:33.000Z (over 1 year ago)
- Last Synced: 2025-02-22T22:37:20.925Z (12 months ago)
- Topics: file-formats, fixed-width, tabular-data
- Language: Julia
- Homepage:
- Size: 30.3 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FixedWidthTables.jl
Read fixed width (so-called ASCII) tables. A wide range of format specification options, including autodetection.
Basic usage:
```julia
julia> using FixedWidthTables
julia> io = IOBuffer("""
123456
789101
""")
julia> FixedWidthTables.read(io, (
x=(1:2, Int),
y=(3:5, Float64),
z=(6:6, Char),
))
2-element StructArray(::Vector{Int64}, ::Vector{Float64}, ::Vector{Char}) with eltype NamedTuple{(:x, :y, :z), Tuple{Int64, Float64, Char}}:
(x = 12, y = 345.0, z = '6')
(x = 78, y = 910.0, z = '1')
```
See source code and tests for more examples and details.