pandas fillna date from another column
<p>Get my test data:</p>

<pre><code> import pandas as pd

 df =    {'Id': {1762056: 2.0, 1762055: 1.0},
'FillDate': {1762056: Timestamp('2015-08-01 00:00:00'), 1762055:Timestamp('2015-08-01 00:00:00')}, 
 'Date': {1762056: nan, 1762055: nan}, 
 }

df = pd.DataFrame(df)
</code></pre>

<p>Data looks like:</p>

<pre><code>        Id         Date        FillDate
        1.0      NaN         2015-08-01
        2.0      NaN         2015-08-01
</code></pre>

<p>So to fill missing date, I do:</p>

<pre><code>df['Date'].fillna(df['FillDate'], inplace=True)
</code></pre>

<p>which gives me</p>

<pre><code>         Id    Date                  FillDate
        1.0  1438387200000000000  2015-08-01
        2.0  1438387200000000000  2015-08-01
</code></pre>

<p>how to get <code>Date</code> column in date form</p>

<p>This worked:</p>

<pre><code> df['Date'].fillna(pd.to_datetime(df['FillDate']).dt.date, inplace=True)
</code></pre>

<p>which gives</p>

<pre><code>      Id    Date       FillDate
      1.0  2015-08-01  2015-08-01
      2.0  2015-08-01  2015-08-01
</code></pre>

python date datetime pandas data-manipulation