According to the documentation matplotlib.mlab.csv2rec
is deprecated, but the message doesn't indicate what we should move to instead. This is an extremely useful function that keeps my scripts short, I don't want to go rewrite all of this by hand. What should I replace this with?
https://matplotlib.org/api/mlab_api.html#matplotlib.mlab.csv2rec
I've been able to get by with the following workaround:
import numpy as np
def csv2rec(filename):
return np.recfromtxt(filename, dtype=None, delimiter=',', names=True, encoding='utf-8')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.