Message Boards Message Boards

GROUPS:

Replace sublist of a list

Posted 8 years ago
5756 Views
|
4 Replies
|
1 Total Likes
|
POSTED BY: Wenzhen Zhu
4 Replies
Posted 8 years ago

And another one:

sample /. Map[sample[[#, 6]] -> ImportString[sample[[#, 6]], "JSON"] &, Range@Length@sample]

This will not change the structure. Which your third example does:

enter image description here

enter image description here

POSTED BY: Hans Milton
Posted 8 years ago

Deleted

POSTED BY: Hans Milton
Posted 8 years ago

One alternative:

test = sample;
(test[[#, 6]] = ImportString[sample[[#, 6]], "JSON"]) & /@ Range[Length@sample];
test
POSTED BY: Hans Milton

Is there a way better than

sample /. sample[[#, 6]] -> ImportString[sample[[#, 6]], "JSON"] & /@ 
 Range[Length[sample]]
POSTED BY: Wenzhen Zhu
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