title: Replace all occurrences of a string in a pandas dataframe (Python)
body: <p>I have a pandas dataframe with about 20 columns.</p>
  
  <p>It is possible to replace all occurrences of a string (here a newline) by manually writing all column names:</p>
  
  <pre><code>df['columnname1'] = df['columnname1'].str.replace("\n","&lt;br&gt;")
  df['columnname2'] = df['columnname2'].str.replace("\n","&lt;br&gt;")
  df['columnname3'] = df['columnname3'].str.replace("\n","&lt;br&gt;")
  ...
  df['columnname20'] = df['columnname20'].str.replace("\n","&lt;br&gt;")
  </code></pre>
  
  <p>This unfortunately does not work:</p>
  
  <pre><code>df = df.replace("\n","&lt;br&gt;")
  </code></pre>
  
  <p>Is there any other, more elegant solution?</p>