Hello, I am a student learning python, and i am running into some difficulties. I am tryign to read a csv file that has different delimiters for different rows: Example:
Format:V1.1 Model: R Step Size: 10mm Distance: 10cm Gain: 1000 X,Y 1,3 2,5 6,5 5,7 For the X,Y data, I have no problem getting it into the right cells, however I cannot separate the values after the colon for the first few rows. Its either one or the other. I am using pandas to read my CSV file. So far I have: d=pd.read_csv('read.csv',delimiter=',',skiprows=0) When I replace the delimiter for ':', it no longer works, and if i put sep=',|:' it does not work either. In the end I need to plot the x,y values and i will need some of the info in the rows above like the gain to manipulate the y data. If you have any tips for me I would be very grateful! Thanks, Giulia _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor