tim4
1
Hi,
What is the best way of importing .csv that have compounded data, like
that shown below.
Symbol,ExpRet,Prob,ExpBeta
AAL,0.10 0.15 0.05 0.04,0.50 0.20 0.20 0.10,0.85
IBM,0.20 0.15 0.10,0.20 0.60 0.10,0.25
I understand that the compounded data is a nested table meaning the
operation can’t be performed like,
(“SFFF”;enlist “,”) 0: `file.csv
Thanks
–
Submitted via Google Groups
something like
q)f:{“F”$/:" "vs/:x} ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
q)update f ExpRet,f Prob,f ExpBeta from (“S***”;enlist “,”)0:`:file.csv ? ? ? ? ? ?
Symbol ExpRet ? ? ? ? ? ? Prob ? ? ? ? ? ?ExpBeta
AAL ? ?0.1 0.15 0.05 0.04 0.5 0.2 0.2 0.1 0.85 ??
IBM ? ?0.2 0.15 0.1 ? ? ? 0.2 0.6 0.1 ? ? 0.25 ??
Atilla kindly reminds me “F”$ is atomic, so
q)f:{“F”$" "vs/:x}
is sufficient