Skip to content

Change csv to deal in strings and convert appended values into strings#630

Open
wfsyre wants to merge 4 commits intoUbuntu-24.04from
feature-write_strings_with_csv_writer
Open

Change csv to deal in strings and convert appended values into strings#630
wfsyre wants to merge 4 commits intoUbuntu-24.04from
feature-write_strings_with_csv_writer

Conversation

@wfsyre
Copy link
Copy Markdown
Collaborator

@wfsyre wfsyre commented Mar 30, 2026

Right now, the CSV writer class can only handle writing doubles to the csv table object. These get converted into strings when writing to the actual CSV. To simplify things, the CSV writer should just maintain a map of strings, which allows us to write any data type we want to the CSV as long as we convert it to a string first. It introduces some extra pre-processing we have to do to recover data from a CSV, but I think the schema of get() is already well established in scrimmage so its not a large burden. This also allows people the added control of determining how their data should be turned into a string instead of leaving it to the CSV writer to determine. I have left the scientific vs fixed schema in there but technically all that should be done before the CSV writer even sees the value. The Visitor stuff is a bit of a hacky way to leave some backward compatibility for the old Append method that only took a double.

@wfsyre wfsyre force-pushed the feature-write_strings_with_csv_writer branch 4 times, most recently from c6b3263 to 692998a Compare April 2, 2026 19:34
@wfsyre wfsyre force-pushed the feature-write_strings_with_csv_writer branch from 692998a to 88491c5 Compare April 2, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant