title: How do I use the Pandas .loc() function when converting a column to DateTime?
body: <p>I'm working on a small project to parse and create graphs based on DNC Primary data. It's all functional so far but I'm working on getting rid of the following SettingWithCopyWarning:</p>
  
  <p>"SettingWithCopyWarning: 
  A value is trying to be set on a copy of a slice from a DataFrame.
  Try using .loc[row_indexer,col_indexer] = value instead</p>
  
  <p>See the caveats in the documentation: <a href="http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy" rel="nofollow noreferrer">http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy</a>
    candidate['end_date'] = pd.to_datetime(candidate_state['end_date'])"</p>
  
  <p>I've tried changing the referenced line to:</p>
  
  <pre><code>candidate.loc['end_date'] = pd.to_datetime(candidate_state['end_date'])
  </code></pre>
  
  <p>But that throws another error about some kind of comparison. Can anyone help me figure this out?</p>
  
  <p>Thank you!</p>