擅长:python、mysql、java
<pre><code>from cStringIO import StringIO
import pandas
s = StringIO()
with open('file.csv') as f:
for line in f:
if not line.startswith('TEST'):
s.write(line)
s.seek(0) # "rewind" to the beginning of the StringIO object
pandas.read_csv(s) # with further parameters…
</code></pre>