Message Boards Message Boards

missing values in imported Excel file

Posted 10 years ago

Hi, I'm trying to filter missing values from an excel spreadsheet that I've imported. Initially the missing value was a period (.) and then I changed it to a "na" in the spreadsheet. I've tried to DeleteCases with the command DeleteCases[data,"na"] but this had no effect. I've tried various other approaches based on what I've read on missing value options in documentation. Any suggestions would be much appreaciated. Best, Pat

POSTED BY: Pat McCarthy
2 Replies
Posted 10 years ago

Since you know what the "missing" value is going to be beforehand (na), you could also use SemanticImport with a replacement rule in your import options. There's an example in the documentation.

POSTED BY: Caitlin Ramsey

Try DeleteCases[data,"na",Infinity] .

POSTED BY: Anton Antonov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract