I have a problem with reading in a CSV file with # signs. The CSV looks like this.
aaa;;xxx;aaa;aaa;aaa;xxx;xxx;xxx;xxx;xxx;xxx;aaa
with aaa
as a string and xxx as float. But in this file there is a line like this:
aaa;;aaa;#N/A;#N/A;#N/A;#N/A;#N/A;#N/A;#N/A;#N/A;#N/A;#N/A
Python keeps saying that this line would have 4 columns instead of 13. He interprets the # as a comment and skips the rest of it. I tried:
kwargs = dict(delimiter=';',
dtype=np.str,
skip_header=11,
usecols= range(1,14),
missing_values = "#N/A",
filling_values = "0")
data = np.genfromtxt(TestFile, **kwargs)
but still couldn't get it to work.
How could I manage that?