I need to load data from the CSV file shown below.
Import[ ] drops the leading zeros in column 3 when it imports the CSV file, but they are security identifiers, and I need them. ReadList[ ] keeps the leading zeros, but I can't get it to break the columns into separate elements. Each record ends up as long string. The options: Word, WordSeparators, ect. don't do what they are supposed to do. I could probably save the file as a TSV, or go into the CSV file and prepend a "'" and the appropriate number of zeros, or use a function to count the number of characters in column three and prepend the missing zeros, but that's just klugy(sp). What is the right way to ReadList[ ] the file?
Here are the first few records in the file (copied by hand). The leading zeros in column three don't appear when the CSV file is loaded in Excel, but they do show up when the file is loaded in Notes++.
date,secid,cus_sed,tick,repno,dis_to_df,impl_rate,prob_df
01/31/2004,753,01381710,AA,0323N,3.20387,BBB,0.00068
01/31/2004,756,00431F10,AABC,34341,2.88794,BB,0.00194
01/31/2004,757,03237110,ANCPA,0591N,3.18587,BBB,0.00072
01/31/2004,759,00440310,AACE,A02B8,3.23057,BBB,0.00062 01/31/2004,767,45814710,FILM,A06F0,2.04099,B-,0.02063
ReadList
example. Is it your intention to keep everything as Strings or would you prefer to have each column in an optimized format? $\endgroup$