title: Change column type in pandas
body: <p>I created a DataFrame from a list of lists:</p>
  <pre><code>table = [
      ['a',  '1.2',  '4.2' ],
      ['b',  '70',   '0.03'],
      ['x',  '5',    '0'   ],
  ]
  
  df = pd.DataFrame(table)
  </code></pre>
  <p>How do I convert the columns to specific types? In this case, I want to convert columns 2 and 3 into floats.</p>
  <p>Is there a way to specify the types while converting to DataFrame? Or is it better to create the DataFrame first and then loop through the columns to change the type for each column? Ideally I would like to do this in a dynamic way because there can be hundreds of columns, and I don't want to specify exactly which columns are of which type. All I can guarantee is that each column contains values of the same type.</p>