I was wondering if anyone had any suggestions on how to do the following: I have multiple files: R1.csv, R2.csv and R3.csv Each file has the following content in the same format: For example: R1.csv:
data_label pt1 pt2
DATA00_A1 1 2
DATA01_A1 11 22
DATA02_A1 111 222
R2.csv:
data_label pt1 pt2
DATA00_A2 1 2
DATA01_A2 11 22
DATA02_A2 111 222
So far to access these files and retrieve the data I have been using pandas:
import pandas as pd
dfObject=pd.read_csv('R1.csv',delimiter=' ')
labels=dfObject.data_label
datax=dfObject.pt1
datay=dfObject.pt2
But now I need to have all the data in one file. For example:
Rall.csv:
data_label pt1 pt2
DATA00_A1 1 2
DATA01_A1 11 22
DATA02_A1 111 222
DATA00_A2 1 2
DATA01_A2 11 22
DATA02_A2 111 222
I am not sure how to begin, so I would appreciate your suggestions, thanks!