擅长:python、mysql、java
<p>如果只有标题后的行丢失<code>EXTRA_INFO_STRING</code>,则可以分别加载列名和数据:</p>
<pre><code>from StringIO import StringIO
df = pd.read_csv(StringIO(s), header=None, skiprows=5)
</code></pre>
<p>以下代码(可能不是很优雅)将加载列名:</p>
^{pr2}$
<p>试验中使用的数据:</p>
<pre><code>s = """myHeader
myJunk
myDate
A, B, C, D
, b, c, d
dataA, dataB, dataC, dataD, EXTRA_INFO_STRING
dataA, dataB, dataC, dataD, EXTRA_INFO_STRING
dataA, dataB, dataC, dataD, EXTRA_INFO_STRING"""
</code></pre>