Message Boards Message Boards

0
|
7573 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Import of CSV file drops the letter F

Posted 10 years ago

Run this; humor me:

alphabet = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}; TableForm[ list = Table[ StringJoin[IntegerString[k], ToUpperCase[alphabet[[j]]]], {j, Length[alphabet]}, {k, 0, 9}]] Export["digitLetterTest.csv", list, "CSV"] TableForm[Import["digitLetterTest.csv"]]

POSTED BY: Michael Lachance
3 Replies

Tried it on 10.0.2 Windows 7 64.

it really drops the F !

interesting one...

POSTED BY: Pedro Fonseca

Lower-case c and p, also.

A developer commented,

"c" and "p" are considered "CurrencyTokens" and are skipped by default when used with numerical values. See the Import options for CSV.

See http://reference.wolfram.com/language/ref/format/CSV.html , under Options - Import Options.

Import options:
    "CurrencyTokens"   {{"$", "£", "¥", "€"}, {"c", "¢", "p", "F"}}  currency unts to be skipped when importing numerical values

I submitted a suggestion that a note on this go in the "Possible Issues" section.

POSTED BY: Bruce Miller

Shouldn't the standard / default operation be more predictable (don't know if this is the good word), and this drop be active just as an option?

Should Import have "interpretation" on by default? I imagine that the line is blur, and even more on complex file formats, but this case seems too much, and most special because standard letters from the alphabet are included in the list. Interestingly, this seems to have been limited to the english world. I can imagine that all 6500 languages considered, this list could increase significantly (probably that would be good, since it would never caught us by surprise...)

POSTED BY: Pedro Fonseca
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract