BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MaVe
Fluorite | Level 6

Hello, I'm trying to import a .csv file (click here to download) in SAS EM 14.1. There are 4 continous variables, with missing values marked by ?, and 1 nominal variable, but the program sets them as nominals and it let me change their levels to anything but continuos. Probably is ?'s fault. What can I do to fix this problem? Thank you in advance.

 

P.S.: I had to set the delimiter character to ; before importing

1 ACCEPTED SOLUTION

Accepted Solutions
WendyCzika
SAS Employee

Yes, I think you need to change the '?'s to '.'s for the missing values.  The '?' makes it think those columns are character instead of numeric, so that's why it will only allow the level to be nominal.  Hope that helps (and let me know if that doesn't work).

 

View solution in original post

4 REPLIES 4
WendyCzika
SAS Employee

Yes, I think you need to change the '?'s to '.'s for the missing values.  The '?' makes it think those columns are character instead of numeric, so that's why it will only allow the level to be nominal.  Hope that helps (and let me know if that doesn't work).

 

MaVe
Fluorite | Level 6

@WendyCzika wrote:

Yes, I think you need to change the '?'s to '.'s for the missing values.  The '?' makes it think those columns are character instead of numeric, so that's why it will only allow the level to be nominal.  Hope that helps (and let me know if that doesn't work).

 


Thank you very much for the tip, it worked! I had to edit the file manually entry-by-entry, because in Excel when I tried to make the replace function (the one next to search) substitute the "?"s with "."s, the program replaced every character of every cell with ".". I was lucky the missing values were just ~20 and the dataset was small, so there was only a little manual work, but I wonder how to replace automatically in .csv files with Excel.

WendyCzika
SAS Employee

It looks like you need to escape the ? with a tilde when you do the Replace in Excel, so enter

~?

in the Find what field.

MaVe
Fluorite | Level 6

@WendyCzika wrote:

It looks like you need to escape the ? with a tilde when you do the Replace in Excel, so enter

~?

in the Find what field.


Thank you very much again for the support!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1146 views
  • 2 likes
  • 2 in conversation