How to change the datetime format in Pandas
<p>My dataframe has a <code>DOB</code> column (example format <strong><code>1/1/2016</code></strong>) which by default gets converted to Pandas dtype 'object'.</p>
<p>Converting this to date format with <code>df['DOB'] = pd.to_datetime(df['DOB'])</code>, the date gets converted to: <strong><code>2016-01-26</code></strong> and its <code>dtype</code> is: <code>datetime64[ns]</code>.</p>
<p>Now I want to convert this date format to <strong><code>01/26/2016</code> or any other general date format</strong>. How do I do it?</p>
<p>(Whatever the method I try, it always shows the date in <code>2016-01-26</code> format.)</p>