0

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

Elliott Slaughter
  • 1,455
  • 19
  • 27

1 Answers1

0

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')
Elliott Slaughter
  • 1,455
  • 19
  • 27