Prevent pandas read_csv treating first row as header of column names
问题 I'm reading in a pandas DataFrame using pd.read_csv . I want to keep the first row as data, however it keeps getting converted to column names. I tried header=False but this just deleted it entirely. (Note on my input data: I have a string ( st = '\n'.join(lst) ) that I convert to a file-like object ( io.StringIO(st) ), then build the csv from that file object.) 回答1: You want header=None the False gets type promoted to int into 0 see the docs emphasis mine: header : int or list of ints,