title: How to Fix Different Type Return in Pandas "np.where"?
body: <p>I have this &quot;np.where&quot; in a script a but when it returns the format changes,</p>
  <p>How can I fix this? I want a return in datatime.</p>
  <pre><code>In [22]: new[[&quot;DME&quot;,&quot;Ent. Prog.&quot;]]
  Out[22]:
              DME Ent. Prog.
  0    2021-07-15
  1    2021-07-15
  ...         ...        ...
  7481 2021-07-13
  7482 2021-07-13
  
  [7483 rows x 2 columns]
  
  In [23]: new[&quot;DME&quot;] = np.where(new['Ent. Prog.'] == '', new[&quot;DME&quot;],new['Ent. Prog.'])
  
  In [24]: new[[&quot;DME&quot;,&quot;Ent. Prog.&quot;]]
  Out[24]:
                        DME Ent. Prog.
  0     1626307200000000000
  1     1626307200000000000
  ...                   ...        ...
  7481  1626134400000000000
  7482  1626134400000000000
  
  [7483 rows x 2 columns]
  
  
  new[&quot;DME&quot;] = np.where(new['Ent. Prog.'] == '', new[&quot;DME&quot;],new['Ent. Prog.'])
  </code></pre>