我是python的新手,所以这听起来很基本.我使用csv2rec导入了一个csv文件.第一行有标题.我想将标题更改为'x','y','z'.这样做的最佳方法是什么?
>>> import matplotlib
>>> import matplotlib.mlab as mlab
>>> r= mlab.csv2rec('HeightWeight.csv', delimiter= ',')
>>> names= r.dtype.names
>>> for i in names:
print i
index
heightinches
weightpounds
Run Code Online (Sandbox Code Playgroud)