Importing CSV dataset in SAS

SAS Analytics Importing CSV file in SAS
3 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€60.90
List Price:  €87.01
You save:  €26.10
£52.35
List Price:  £74.79
You save:  £22.44
CA$96.85
List Price:  CA$138.36
You save:  CA$41.51
A$109.31
List Price:  A$156.17
You save:  A$46.85
S$91.50
List Price:  S$130.73
You save:  S$39.22
HK$542.97
List Price:  HK$775.70
You save:  HK$232.73
CHF 56.77
List Price:  CHF 81.11
You save:  CHF 24.33
NOK kr724.23
List Price:  NOK kr1,034.66
You save:  NOK kr310.42
DKK kr454.72
List Price:  DKK kr649.63
You save:  DKK kr194.91
NZ$116.55
List Price:  NZ$166.51
You save:  NZ$49.95
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.18
৳8,499.86
List Price:  ৳12,143.18
You save:  ৳3,643.32
₹5,961.86
List Price:  ₹8,517.31
You save:  ₹2,555.44
RM307.25
List Price:  RM438.95
You save:  RM131.70
₦112,314.35
List Price:  ₦160,455.95
You save:  ₦48,141.60
₨19,632.19
List Price:  ₨28,047.19
You save:  ₨8,415
฿2,325.05
List Price:  ฿3,321.64
You save:  ฿996.59
₺2,677.91
List Price:  ₺3,825.75
You save:  ₺1,147.84
B$406.55
List Price:  B$580.81
You save:  B$174.26
R1,304.52
List Price:  R1,863.68
You save:  R559.16
Лв119.03
List Price:  Лв170.05
You save:  Лв51.02
₩99,699.92
List Price:  ₩142,434.57
You save:  ₩42,734.64
₪260.09
List Price:  ₪371.58
You save:  ₪111.48
₱3,966.64
List Price:  ₱5,666.88
You save:  ₱1,700.23
¥9,830.60
List Price:  ¥14,044.32
You save:  ¥4,213.71
MX$1,374.78
List Price:  MX$1,964.06
You save:  MX$589.27
QR254.83
List Price:  QR364.06
You save:  QR109.23
P964.11
List Price:  P1,377.36
You save:  P413.25
KSh9,077.70
List Price:  KSh12,968.70
You save:  KSh3,891
E£3,573.93
List Price:  E£5,105.84
You save:  E£1,531.90
ብር9,165.19
List Price:  ብር13,093.69
You save:  ብር3,928.50
Kz64,215.82
List Price:  Kz91,740.82
You save:  Kz27,525
CLP$67,298.07
List Price:  CLP$96,144.23
You save:  CLP$28,846.15
CN¥510.39
List Price:  CN¥729.16
You save:  CN¥218.77
RD$4,181.90
List Price:  RD$5,974.40
You save:  RD$1,792.50
DA9,233.57
List Price:  DA13,191.38
You save:  DA3,957.81
FJ$157.49
List Price:  FJ$225
You save:  FJ$67.50
Q539.06
List Price:  Q770.11
You save:  Q231.05
GY$14,679.35
List Price:  GY$20,971.40
You save:  GY$6,292.05
ISK kr8,825.03
List Price:  ISK kr12,607.73
You save:  ISK kr3,782.70
DH646.68
List Price:  DH923.87
You save:  DH277.19
L1,209.44
List Price:  L1,727.84
You save:  L518.40
ден3,745.06
List Price:  ден5,350.32
You save:  ден1,605.25
MOP$559.23
List Price:  MOP$798.94
You save:  MOP$239.70
N$1,313.71
List Price:  N$1,876.81
You save:  N$563.10
C$2,573.90
List Price:  C$3,677.16
You save:  C$1,103.25
रु9,542.77
List Price:  रु13,633.12
You save:  रु4,090.34
S/259.27
List Price:  S/370.41
You save:  S/111.13
K284.47
List Price:  K406.40
You save:  K121.93
SAR262.53
List Price:  SAR375.06
You save:  SAR112.53
ZK1,992.94
List Price:  ZK2,847.18
You save:  ZK854.24
L303.11
List Price:  L433.04
You save:  L129.92
Kč1,526.05
List Price:  Kč2,180.17
You save:  Kč654.11
Ft24,911.28
List Price:  Ft35,589.07
You save:  Ft10,677.79
SEK kr664.46
List Price:  SEK kr949.26
You save:  SEK kr284.80
ARS$76,465.40
List Price:  ARS$109,240.97
You save:  ARS$32,775.57
Bs484.18
List Price:  Bs691.72
You save:  Bs207.53
COP$298,000.37
List Price:  COP$425,733.06
You save:  COP$127,732.69
₡35,172.63
List Price:  ₡50,248.77
You save:  ₡15,076.13
L1,809.24
List Price:  L2,584.74
You save:  L775.49
₲559,780.71
List Price:  ₲799,721.01
You save:  ₲239,940.30
$U2,963.96
List Price:  $U4,234.41
You save:  $U1,270.45
zł260.87
List Price:  zł372.68
You save:  zł111.81
Already have an account? Log In

Transcript

In this video we will be discussing about how to import a CSV file into SAS. For this we'll be using the procedure called proc import data file. So let's do it proc import data file. Equals first we have to give the path of our data file via var we'll do import the CSV file for linear regression. So this is my linear regression CSV file. I can take the path from the properties or even take it from the address bar.

Then we have to give the name of the data file that is the CSV file that is linear underscore record is predicted dot CSV and we are using the keyword for out equals to linear. So after we import the data file into SAS, the data set will be created inside work as we did not specify any library name over here and it will be the name of the data set will be linear. Then we are giving the key word called replace, replace transform. My Excel file is getting replaced with SAS data set and then Dra. Let's run this code So this is my work literally. Let's open the linear data set, proceed This is my data set, whichever imported.

Here I have got 200 observations. And I have variables like customer satisfaction, product quality, ecommerce, technical support content resolution advertising, product line, sales force image, competitive pricing, warranty claims packaging, or the billing, flat price, flexibility and delivery. So I have around 13 to 14 independent we're 13 to 14 variables or columns, where since this is a linear regression data, so you can understand very well my customers are searching the dependent variable and the rest of my independent variables. So basically I have converted my CSV file into a fast phi or those fast data set. If this file was an Excel file, say if it was if the CSV file was an Excel file means it is saved in dot XLS format or dot XLS x format. So if it is in dot XLS format we are going to just replace the CSV by XLS and then we are going to import it.

So, this is how you import an Excel file into SAS. Thank you. Goodbye. See you all for the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.