def test_extract_pandas_series_issue():
    """Reproduce issue that arises with pd.Series but not pd.DataFrame.

    >>> data = [[0, 1, 0.1], [0, 1, 0.2], [0, 1, 0.3]]
    >>> df = pd.DataFrame(data, columns=['x', 'y', 'z']).set_index(['x', 'y'])
    >>> df['z'].groupby(['x', 'y']).count()
    {(0, 1): 3}

    >>> data = [[0, 1, 0.1], [0, 1, 0.2]]
    >>> df = pd.DataFrame(data, columns=['x', 'y', 'z']).set_index(['x', 'y'])
    >>> df['z'].groupby(['x', 'y']).count()
    {'x': 1, 'y': 1}

    >>> df[['z']].groupby(['x', 'y'])['z'].count().to_dict()
    {(0, 1): 2}
    """
    acc = mm.MOTAccumulator(auto_id=True)
    acc.update([0], [1], [[0.1]])
    acc.update([0], [1], [[0.1]])
    ocs, hcs, tps = _extract_counts(acc)
    assert ocs == {0: 2}
    assert hcs == {1: 2}
    assert tps == {(0, 1): 2}
Reproduce issue that arises with pd.Series but not pd.DataFrame.

    >>> data = [[0, 1, 0.1], [0, 1, 0.2], [0, 1, 0.3]]
    >>> df = pd.DataFrame(data, columns=['x', 'y', 'z']).set_index(['x', 'y'])
    >>> df['z'].groupby(['x', 'y']).count()
    {(0, 1): 3}

    >>> data = [[0, 1, 0.1], [0, 1, 0.2]]
    >>> df = pd.DataFrame(data, columns=['x', 'y', 'z']).set_index(['x', 'y'])
    >>> df['z'].groupby(['x', 'y']).count()
    {'x': 1, 'y': 1}

    >>> df[['z']].groupby(['x', 'y'])['z'].count().to_dict()
    {(0, 1): 2}
    
motmetrics/tests/test_metrics.py