Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Write in a csv file
#1
Hello,
I receive a data stream i want to record in a variable (array, list or dictionnary) and then write these data in a csv file.
My streamed data are coordinates of multiple marker. Hence at each loop i receive a data frame (marker1:x,y,z; marker 2:x,y,y ect..), so for exemple with 4 markers i receive 12 streamed data at each loop.
I would like to write these data in a csv file like this (data separated with tabulation):

marker 1.... marker 2....marker3 ect...
x y z......x y z......x y z
1 2 3......5 5 6......4 9 8
4 5 6......7 2 4......4 6 5

It seems simple but i really don't know what/how i can use array, list or dictionnary to do that.
Any help please?
Thanks
Quote
#2
you can do it directly in pandas, see:
https://pandas.pydata.org/pandas-docs/st...o_csv.html
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Write SQLite query result to file hjk6734 1 61 May-27-2020, 12:17 PM
Last Post: menator01
  Append JSON's and write to file faqsap 4 177 May-15-2020, 04:20 PM
Last Post: faqsap
  Print/write to file function tpolim008 4 216 Apr-01-2020, 07:59 PM
Last Post: tpolim008
  Write object to file medatib531 7 229 Apr-01-2020, 06:25 PM
Last Post: BrendanD
  Replace XML tag and write to the same file krish216 4 275 Mar-26-2020, 07:39 AM
Last Post: snippsat
  can we write command output to new csv file using Panda package? PythonBeginner_2020 3 328 Mar-13-2020, 12:38 PM
Last Post: ndc85430
  What mode should i open the file to write into a *.msh file Dhanya 0 298 Jan-09-2020, 08:27 AM
Last Post: Dhanya
  how to write messages from command window to log file SriRajesh 1 358 Dec-25-2019, 03:57 PM
Last Post: ibreeden
  Write the XML file from elementtree with hexa decimal encoding Dillibabu 4 276 Dec-24-2019, 10:10 AM
Last Post: Dillibabu
  write an integer to file using a function xvkxvo 4 387 Dec-10-2019, 11:27 PM
Last Post: xvkxvo

Forum Jump:


Users browsing this thread: 1 Guest(s)