python - Error in matplotlib csv2rec function -
i using csv2rec read csv file. many fields in csv file named "ms1-api2_c". when field read csv2rec, field name being converted "ms1api2_c". can not access column elements using converted field name or original field name. please suggest solutions.
csv2rec
designed automatically lowercase headers, can around feature using following approach:
import matplotlib.mlab import csv filename = 'input.csv' open(filename, 'r') f_input: headers = next(csv.reader(f_input)) data = matplotlib.mlab.csv2rec(filename, names=headers)
to quote matplotlib documentation:
the headers lower cased, spaces converted underscores, , illegal attribute name characters removed.
Comments
Post a Comment