Jun-28-2017, 08:51 AM
One way would be to do all the work yourself:
1. read a line (from the csv file or the json object)
2. strip the new line
3. split at the separator
4. convert to float using
steps 2 and 3 can be done for you if using the csv module (part of the Standard Python library)
all of the above could be done also using external packages as pandas/numpy. Given that you plan to plot the data - maybe this is the way to go.
1. read a line (from the csv file or the json object)
2. strip the new line
'\n'
(if reading from text file)3. split at the separator
','
(if reading from text file4. convert to float using
float()
steps 2 and 3 can be done for you if using the csv module (part of the Standard Python library)
all of the above could be done also using external packages as pandas/numpy. Given that you plan to plot the data - maybe this is the way to go.