title: How to convert multiple pandas columns from string boolean to boolean?
body: <p>I have this dataframe</p>
  <pre><code>data = [['Tom', 16, 'True','False'], ['Nick', 19, 'False','True'], ['Juli', 17, 'True','True']] 
  df = pd.DataFrame(data, columns = ['Name', 'Age', 'Writer','Artist']) 
  </code></pre>
  <p>I want to convert the string booleans to booleans.</p>
  <p>I have tried</p>
  <pre><code>def str_to_bool(s):
      if s == 'True':
           return True
      elif s == 'False':
           return False
      else:
           raise ValueError
  
  df[['Writer','Artist']] = df[['Writer','Artist']].apply(str_to_bool)
  </code></pre>
  <p>and</p>
  <pre><code>import ast
  df[['Writer','Artist']] = df['Writer','Artist'].map(ast.literal_eval)
  </code></pre>
  <p>but neither of these worked.</p>
  <p>Is it possible to do convert the type of multiple columns in a single line or do I have to convert the relevant columns one at a time?</p>