Analyzing data seperated by commas - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: Analyzing data seperated by commas (/thread-20363.html) |
Analyzing data seperated by commas - Kappel - Aug-07-2019 Hi Guys, I am pretty new to Python, so apologies if this is really simple. I am currently trying to analyse some weather data at work. From our logger I receive data in the bellow format: "TIMESTAMP","RECORD","Heartbeat","PanelTemperature_Avg","PanelTemperature_Min",....(approx 50 more) "TS","RN","","","","","","","","","","°C","°C","°C","°C","mV","mV",... (Approx 50 more) "","","Smp","Avg","Min","Max","Std","Avg","Min","Max","Std",.... (Approx 50 more) "2019-08-06 04:40:00",85,600,9.69153,9.680847,9.69577,0.004366992,14.04036,14.02737,14.04433...(50 more) "2019-08-06 04:50:00",86,600,9.66861,9.65918,9.681,0.00602752,14.043,14.02206,14.04679,0.003522844,(50 more) ... You get the picture I get a list separated by commas containing: measurement name, unit type, value, 10 min avg. of data for a variation of sensors (about 50 parameters in total) What i would like to do is separate 1 measurement name and all of its data outputs with timestamps, so I can isolate that specific type of data and create graphs. Is there anyone that could hint me in the right direction? Cheers!, RE: Analyzing data seperated by commas - Yoriz - Aug-07-2019 You can use CSV File Reading and Writing. or split a string. If they are already a list you can acces parts by index and https://python-forum.io/Thread-Basic-Lists. RE: Analyzing data seperated by commas - ThomasL - Aug-07-2019 I would definitely recommend using pandas to do what you want to do. How to read csv files with pandas |