Pandas .idxmin() Throwing ValueError with Groupby
<p>I have a dataframe with thousands of rows containing multiple entries for multiple people:</p>

<pre><code>    Name        ID          Date
0   Person A    9999249491  2015-12-28
1   Person A    9999249491  2015-12-29
2   Person A    9999293341  2015-12-30
3   Person B    9999293341  2015-12-30
4   Person B    9999293341  2015-12-31
</code></pre>

<p>I want to find the <em>index</em> of the minimum <code>Date</code> for each person using <code>groupby()</code> and <code>idxmin()</code> but I am receiving a <code>ValueError</code> message when I execute the following:</p>

<pre><code>df.groupby(['Name','ID'])['Date'].idxmin()
</code></pre>

<p>returns the following error:</p>

<pre><code>---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
&lt;ipython-input-153-ef18ad96a6d8&gt; in &lt;module&gt;()
      3 t = df[['Name','ipg_id','Date']]
      4 
----&gt; 5 t.groupby(['Name','ipg_id'])['Date'].idxmin()

C:\Users\nickb\Anaconda2\lib\site-packages\pandas\core\groupby.pyc in idxmin(self, axis, out, skipna)

C:\Users\nickb\Anaconda2\lib\site-packages\pandas\core\groupby.pyc in wrapper(*args, **kwargs)
    548                                                             *args, **kwargs)
    549                     except (AttributeError):
--&gt; 550                         raise ValueError
    551 
    552         return wrapper

ValueError: 
</code></pre>

<hr>

<p>I can, however, execute the <code>min()</code> method without any problems:</p>

<pre><code>df.groupby(['Name','ID'])['Date'].min()
</code></pre>

<p>returns:</p>

<pre><code>Name        ID
Person A    9999249491    2015-12-28
Person B    9999293341    2015-12-30
</code></pre>

<p>I can't seem to figure out why I am receiving the <code>ValueError</code> message.  Any clues on getting <code>idxmin()</code> to work would be great.  Thank you.</p>