I do data hashing, and I created a program for Python on Windows, and now I want to run it on my Linux box so that it can crunch while I get home to drink beer, etc.
One piece of code (important) swallows some column values from a CSV file using the Numpy genpromtxt method. code snippet:
rfd_values = np.genfromtxt(file_in, delimiter=',',
skip_header=1,
invalid_raise=0,
usecols = cols)
So, the idea is here: skip the header, the separator is a comma and give me only the columns from the list called by cols. This works on a Windows laptop (e.g. Python and Numpy, 2.6 and 1.5 respectively), but when I run it on Linux, it tells me:
* TypeError: genfromtxt () received an unexpected keyword argument 'skip_header' *
I tried putting everything on one line and changing the quotation marks for the separator keyword, but that didn't seem to work. Most likely, this is something stupid, but I can not appear on it. I went through a bunch of Numpy forums and docs and didn’t see anything like what I saw. I wonder what I am missing.
I would really appreciate your understanding.
Thanks in advance!
-Jeff
source
share