title: Suppress error message during reading of file in python
body: <p>I am reading a text file using <code>pandas.read_csv</code>. An small example of the file can be found <a href="https://drive.google.com/open?id=1P8RYJAOWT7LLMkmV_VX_nJk85uslzyKx" rel="nofollow noreferrer">here</a>. Below, is the way in which I am reading the file.</p>
  
  <pre><code>df = pd.read_csv('file.txt', error_bad_lines=False, sep=r'\t+', header=None, dtype='|U', engine='python')
  </code></pre>
  
  <p>I am able to read the file properly and do all work. But, I keep getting messages like the ones shown below, and I will like to ignore them.</p>
  
  <pre><code>Skipping line 689: Expected 81 fields in line 689, saw 265. Error could possibly be due to quotes being ignored when a multi-char delimiter is used.
  </code></pre>
  
  <p>There are hundreds of such lines (for different line numbers). I have already tried the answer for hiding of warnings shown in <a href="https://stackoverflow.com/questions/9031783/hide-all-warnings-in-ipython/9031848#9031848">here (Hide all warnings)</a>. Unfortunately, it does not work. Also, I will like to <strong>suppress (not show) only the specific kind of error messages that I have mentioned in this post</strong> (<code>Skipping line ... delimiter is used.</code>).  </p>
  
  <p>How can I do this?</p>