How do I access a column from a CSV file and iterate it to plot a graph?

Hi everyone, I need to plot the price of a stock and iterate it for over a year. However i'm quite unsure on how I can call upon the data in order to call it. Do I use a .getRow(); function? Do I have to use a String instead of a Table? whats the benefits between using one or the other? Strings, Tables, Floats, Ints, all seem to store information as different types of variables such as text or numbers, but what is the easiest way to manipulate it? I've read a ton online and can't seem to grasp these concepts.

Tagged:

Answers

  • I believe I need to plot the "Adj Close" column to the graph. But I do not know how to call the data from the column to the program.

    given that it's picking up all the other values using

    sum+=row.getFloat("Close"); // etc
    

    i think you just need to use the new column name instead of "Close" to pick up the new column

  • you can use the column number instead of the name if that's causing you problems.

Sign In or Register to comment.