我的文件是這樣的:爲什麼不SAS讀取文件正確基於逗號分隔符或閱讀全線
"John","Smith","Blah, John B","1234 N Something St","New Orleans","Orleans","LA",70116,"555-555-5555","666-555-1234","[email protected]","http://www.something.com"
"John2","Smith2","Blah2, John2 B","4567 S Blah St","New Orleans2","Orleans2","LA2",70116,"777-555-5555","777-555-1234","[email protected]","http://www.something2.com"
文件是相當大的,但我在這裏只保留兩行簡單。
我的SAS代碼:
data sample;
infile '/folders/myfolders/samplefile2.csv' dsd dlm="," missover;
input first_name$ last_name$ company_name$ address$ city$ county$ state$ zip$ phone1$ phone2$ email$ web$;
run;
proc print data=sample;
run;
我得到的輸出是:
c
o
f m
i l p
r a a
s s n a
t t y d c p p
_ _ _ d o s h h e
n n n r c u t o o m
O a a a e i n a z n n a w
b m m m s t t t i e e i e
s e e e s y y e p 1 2 l b
1 John Smith Blah, Jo 1234 N S New Orle Orleans LA 70116 555-555- 666-555- [email protected] http://w
我的問題是,爲什麼我無法正確讀取數據,或者爲什麼它甚至沒有閱讀第二行?
我編輯了您的問題,以便它不再包含個人信息。請勿將其他人的個人信息發佈到StackOverflow(或其他互聯網上的其他任何地方)。花時間去創建一些虛擬信息。 –