Python Forum
extract and plot data from a txt file - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: extract and plot data from a txt file (/thread-36990.html)



extract and plot data from a txt file - usercat123 - Apr-20-2022

Hello,

I want to extract data from a txt file and plot it using the matplot.pyplot module.

The format of the file is as follows:

"", "V1", ..., "Vn"
"1", data1_1, ..., data1_n
...
"m", datam_1,...,datam_n
datax_y represents a data unit (integers in this case), the rest is irrelevant. My questions: how can I most elegantly extract the data line by line?
Thanks!


RE: extract and plot data from a txt file - Larz60+ - Apr-20-2022

Please:


RE: extract and plot data from a txt file - usercat123 - Apr-20-2022

Okay sorry :)