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

missingsstring does not behave as documented #1148

Closed
haberdashPI opened this issue Nov 26, 2024 · 2 comments
Closed

missingsstring does not behave as documented #1148

haberdashPI opened this issue Nov 26, 2024 · 2 comments

Comments

@haberdashPI
Copy link

MWE:

julia> CSV.write("test.csv", DataFrame(;a=[missing,1], c=[2,missing]); missingsstring="NA")   

shell> cat test.csv
a,c
,2
1,
@haberdashPI haberdashPI changed the title missingsstring does not behavior as documented missingsstring does not behaveas documented Nov 26, 2024
@haberdashPI haberdashPI changed the title missingsstring does not behaveas documented missingsstring does not behave documented Nov 26, 2024
@haberdashPI haberdashPI changed the title missingsstring does not behave documented missingsstring does not behave as documented Nov 26, 2024
@pdeffebach
Copy link

Interestingly, I can only reproduce when using dataframes, not with a vector of named tuples

julia> CSV.write("test.csv", DataFrame(;a=[missing,1], c=[2,missing]); missingsstring="NA")
"test.csv"

shell> cat test.csv
a,c
,2
1,

julia> t = [(a = 1, b = 2), (a = missing, b = 4)];

julia> CSV.write("test.csv", t; missingstring = "NA")
"test.csv"

shell> cat test.csv
a,b
1,2
NA,4

@pdeffebach
Copy link

@haberdashPI The issue you face is simply a typo. You want missingstring, rather than missingsstring (you have an extra s)

We can close this issue. However @quinnj should we try to implement stricter keyword argument handling?

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

2 participants