PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, August 28, 2022

[FIXED] How do I replace "NA" with "missing" when using CSV.read in Julia?

 August 28, 2022     csv, julia, missing-data, na     No comments   

Issue

I have a csv file with a few NAs sprinkled in. Due to their presence, the columns containing the NAs are classified as strings rather than floats.

I just want to read the csv file with NAs in a way that Julia recognizes "NA" as a missing value rather than a string "NA." I tried the solution in this post; however, I get the following error:

ERROR: MethodError: no method matching CSV.File(::string; null="NA")

Any ideas on how to remedy this problem? Thank you.


Solution

Use the missingstring="NA" keyword argument as described in the documentation.



Answered By - Bogumił Kamiński
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing