Subscribe Bookmark RSS Feed

JMP Import CSV - column with only "NA" values.

jason_paquette

Community Trekker

Joined:

Jan 26, 2015

Hello,

This was more of an observation, and I was wondering if anyone could confirm that this is indeed intended functionality.

I noticed that if I import a CSV into JMP and a column only contains "NA" for every value in all rows, the column shows up with all missing values.

On the contrary, if at least one row has a different string value than "NA", all of the "NA" valued rows appear as "NA" and not missing.

Importing a CSV with a column that has a single value for all rows other than "NA" does not turn the values all to missing, so I am thinking "NA" is something JMP checks for.

Has anyone noticed this before?

Thanks,

JP

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Yes, the code that attempts to guess the column's data type (character or numeric) has some heuristics based on consistency of missing value representation and special cases like NA and NaN .  If JMP guesses wrong, you can force the data type through the import wizard or through JSL.  If you use the same CSV file a lot, you could grab the source script and set the column types the way you want.  For very large CSV files, this could save a lot of time since JMP wouldn't need to read the file an extra time to figure out the column types.

Craige
2 REPLIES
Solution

Yes, the code that attempts to guess the column's data type (character or numeric) has some heuristics based on consistency of missing value representation and special cases like NA and NaN .  If JMP guesses wrong, you can force the data type through the import wizard or through JSL.  If you use the same CSV file a lot, you could grab the source script and set the column types the way you want.  For very large CSV files, this could save a lot of time since JMP wouldn't need to read the file an extra time to figure out the column types.

Craige
jason_paquette

Community Trekker

Joined:

Jan 26, 2015

Thank you, this helped.