Skip to content

BinGrouper breaks on DataFrame.transform #8430

Closed
@dalejung

Description

@dalejung
import pandas as pd
import numpy as np
from pandas.tseries.resample import TimeGrouper
import pandas.util.testing as tm

df = tm.makeTimeDataFrame()
tg = TimeGrouper('M')

func = lambda x: (x - 1)
df.groupby(tg).transform(func)
/externals/pandas/pandas/core/groupby.py in _get_compressed_labels(self)
   1360     def _get_compressed_labels(self):
-> 1361         all_labels = [ping.labels for ping in self.groupings]
   1362         if self._overflow_possible:

TypeError: 'NoneType' object is not iterable

Seems related to #8049 as that check group_info which errors on BinGrouper since there are no groupings

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions