Skip to content

Commit

Permalink
Merge pull request #2680 from midichef/fixed_width_empty_null
Browse files Browse the repository at this point in the history
[fixed-] use empty str for null_value in fixed width sheet
  • Loading branch information
anjakefala authored Jan 18, 2025
2 parents 70699c1 + cd1909d commit 817c008
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions visidata/loaders/fixed_width.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,5 @@ def save_fixed(vd, p, *vsheets):
for col, val in dispvals.items():
fp.write(('{0:%s%s.%s} ' % ('>' if vd.isNumeric(col) else '<', widths[col], widths[col])).format(val))
fp.write('\n')

FixedWidthColumnsSheet.options.null_value = '' # the file format cannot contain None, so use empty string instead

0 comments on commit 817c008

Please sign in to comment.