Message Boards Message Boards

1
|
2362 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:
GROUPS:

Import function

Posted 12 years ago
I used function "Import " with element specifications-"Data". It is the most convenient setting for me (at least it seems to me).  It matches the imported columns up to my expectations, however I'd like one column which consists of integers only to be imported as strings instead of integers . So the question is that if it is possible to make an exemption to freeze default data format for integers while using above mentioned element specifications?
POSTED BY: Artur Kotarski
3 Replies
Perhaps if you clarify your question with a simplified example, then I can improve my answer.
POSTED BY: Arnoud Buzing
Posted 12 years ago
These  do not work , anyway I thank for clues .
POSTED BY: Artur Kotarski
In that case maybe you just want to use MapAt? For example:

data = ImportString["Erik 45\nRyan 65\nAlan 12", "Data"];
MapAt[ToString, data, {All, 2}]
POSTED BY: Arnoud Buzing
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