Skip to content
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

CSV parse functions don't get run on null values #321

Open
ghing opened this issue Feb 21, 2023 · 0 comments
Open

CSV parse functions don't get run on null values #321

ghing opened this issue Feb 21, 2023 · 0 comments

Comments

@ghing
Copy link

ghing commented Feb 21, 2023

The parse function passed as options to methods like loadCSV() only get called on non-null values. I learned this when parsing data exported from a system that represents values from a checkbox widget as 1 if the box is checked and null otherwise. I wanted to convert these to true or false using a function to parse the values on load. However, this function only got called on the non-null values. There are a number of workarounds (parse values outside of Arquero, do it after load with table.derive(), fill null values with false), but it would have been nice to understand why my code wasn't behaving as expected.

There are a number of workarounds, but it would either be helpful to document this behavior, or change it to call the parser on all values. I'm assuming skipping null values is an optimization, so if the path forward is a documentation mention, I can submit a PR with how I'd phrase it in the API docs.

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

No branches or pull requests

1 participant