Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15533
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Import CSV can not understand string correctly |
| Date | 2013-09-25 06:26 +0000 |
| Message-ID | <l1tvm8$3b6$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
On 9/24/13 at 4:16 AM, itais@wolfram.com (Itai Seggev) wrote: >On Sat, Sep 21, 2013 at 04:36:10AM -0400, Joug Raw wrote: >>In my CSV file, I have string fields like 3D22 or so. While I >>imported the CSV file in mathemtaica, the 3D22 string was converted >>to number 3x10^22. >>How dose this happened??? How can I avoid this kind of >>transformation and keep my original string when Import a CSV file? >You can set the option "Numeric"->False which will keep everything >as strings. Numbers will need to be explicitly converter to them, >though. Wouldn't this be equivalent to: StringSplit[ReadList[filename.csv, String],","] And given what Import needs to do to decide how to parse a file, wouldn't using StringSplit with ReadList be more efficient? Or perhaps the option "Numeric"->False effectively eliminates enough processing of the file by Import there is no significant difference?
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Import CSV can not understand string correctly Bill Rowe <readnews@sbcglobal.net> - 2013-09-25 06:26 +0000
csiph-web