Python Forum
Analyzing data seperated by commas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Analyzing data seperated by commas
#1
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!,
Reply
#2
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.
Reply
#3
I would definitely recommend using pandas to do what you want to do.
How to read csv files with pandas
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  print on a single line with start/end brackets and commas Paulman 2 1,804 Oct-23-2021, 10:00 AM
Last Post: Paulman
  Regex: Matches a number with commas for every three digits linh_py 2 3,704 Jun-25-2019, 03:47 AM
Last Post: linh_py
  Python - Analyzing for even intergers and multiples jhenehan 2 3,991 Sep-04-2017, 12:10 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020