title: how to broadcast-add the first date per ID as column to multiindex dataframe?
body: <p>How do I add a column with the first <code>date</code> per <code>id</code> as category?</p>
  <p>something like:</p>
  <pre class="lang-py prettyprint-override"><code>df = df.broadcast_assign(level=&quot;id&quot;, colname=&quot;Init&quot;, data=date_of(df.groupby(&quot;id&quot;).first()))`
  </code></pre>
  <h1>Data</h1>
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  import pandas as pd
  
  def time(t):
      return pd.Timestamp(&quot;2019-01-01T12&quot;) + pd.to_timedelta(t, &quot;d&quot;)
  
  
  arrays = [
      np.array([1, 1, 2, 2]),
      np.array([time(0), time(1), time(396), time(365)]),
  ]
  df = pd.DataFrame(np.round(np.random.rand(1,4).T, decimals=1), index=arrays, columns=[&quot;x&quot;])
  df.index.names = [&quot;id&quot;, &quot;time&quot;]
  </code></pre>
  <p>returns</p>
  <pre><code>                            x
  id  time    
  1   2019-01-01 12:00:00     0.4
      2019-01-02 12:00:00     0.6
  2   2020-02-01 12:00:00     0.3
      2020-01-01 12:00:00     0.9
  </code></pre>
  <h1>Target</h1>
  <pre><code>                            x      Init
  id  time    
  1   2019-01-01 12:00:00     0.4    2019-01-01
      2019-01-02 12:00:00     0.6    2019-01-01
  2   2020-02-01 12:00:00     0.3    2020-01-01
      2020-01-01 12:00:00     0.9    2020-01-01
  </code></pre>