Read csv with pandas with commented header
问题 I have CSV files that have # in the header line: s = '#one two three\n1 2 3' If I use pd.read_csv the # sign gets into the first header: import pandas as pd from io import StringIO pd.read_csv(StringIO(s), delim_whitespace=True) #one two three 0 1 2 3 If I set the argument comment='#' , then pandas ignores the line completely. Is there an easy way to handle this case? Second issue, related, is how can I handle quoting in this case, it works with no # : s = '"one one" two three\n1 2 3' print