I would like to transform a "text" list into a "number" list

Hello everyone,
I have been browsing this forum for a few days looking for a solution but without success... Here is my problem:

I get a table on a google sheet and I want to display the data on a chart


Here is the document

So I get a list but a list of text [ ["X", "X"] ] and the module to display the graph wants text and numbers like this : [ ["X",X] ] . Here is a list that works:

Moreover, it is necessary to keep the title of the data in texts for the first 2. How can I do?

Thanks in advance

Your blocks like this:

Chart

1 Like

Yes, but I don't create the list myself, I get it from a file and I want to transform it. The values are intended to evolve. It's just a format problem that I can't solve.
I want to transform the list that I have on this one format:
image
=>
image

Perhaps multiply the values by 1. That should 'make them' behave as numbers. See post #15 in How can I convert text to "number"?

Yeah, but my problem is How i do it with à List?

Create a 'new' List (multiplying the text items by 1) by using the for each number from... block or the for each item in list block perhaps. Then use that List to create the graph.

1 Like


I'm sorry but I didn't understand how you think I should do

The chart can handle either list

1 Like

thx, exactly what I need ! Have a nice day :wink:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.