title: Pandas:How to convert date format %Y-%M-%D into %Y%M%D?
body: <p>I have a dataframe, which can be shown as follows:</p>
  
  <p><strong>Input</strong></p>
  
  <pre><code>import pandas as pd 
  df=pd.DataFrame({'time':['2018-07-04','2018-04-03',]})
  print('df\n',df)
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>         time
  0  2018-07-04
  1  2018-04-03
  </code></pre>
  
  <p><strong>Expected</strong></p>
  
  <pre><code>     time
  0  20180704
  1  20180403
  </code></pre>