I could not find such an option in the documentation. A measuring device spits out everything in Excel:
<>
I have the same problem. My first line is:
# id ra dec ...
Where #
is the commenting-character in Python. import_csv
thinks that #
is a column header, but it's not.
The workaround I used was to define the headers manually:
headerlist = ['id', 'ra', 'dec', ...]
df = pd.read_csv('data.txt', index_col=False, header=0, names=headerlist)
Note that index_col
is optional in regards to this problem.
If there is any option to ignore a certain character in header line, I haven't found it. Hope this solution can be improved upon.