title: Pandas replace column values with a list
body: <p>I have a dataframe <code>df</code> where some of the columns are strings and some are numeric. I am trying to convert all of them to numeric. So what I would like to do is something like this:</p>
  
  <pre><code>col = df.ix[:,i]
  le = preprocessing.LabelEncoder()
  le.fit(col)
  newCol = le.transform(col)
  df.ix[:,i] = newCol
  </code></pre>
  
  <p>but this does not work. Basically my question is how do I delete a column from a data frame then create a new column with the same name as the column I deleted when I do not know the column name, only the column index?</p>