title: How can I replace multiple characters from all columns of a spark dataframe?
body: <p>I have a dataframe containing multiple columns.</p>
  
  <pre><code>&gt;&gt;&gt; df.take(1)
  [Row(A=u'{dt:dt=string, content=Prod}', B=u'{dt:dt=string, content=Staging}')]
  </code></pre>
  
  <p>I want to remove both curly braces '{' and '}' from values of column A and B of df. I know we can use:</p>
  
  <pre><code>df.withColumn('A',regexp_replace('A','//{',''))
  df.withColumn('A',regexp_replace('A','//}',''))
  df.withColumn('B',regexp_replace('B','//}',''))
  </code></pre>
  
  <p>How do I replace characters dynamically for all columns of Spark dataframe? (Pandas version is shown below)</p>
  
  <pre><code>df = df.replace({'{':'','}':''},regex=True)
  </code></pre>