Skip to content

BUG: groupby segfaults when passed a function of a timestamp which raises a TypeError #3035

Closed
@dhirschfeld

Description

@dhirschfeld

It is a dumb thing to do, but pandas probably shouldn't segfault regardless:

In [1]: dates = pd.date_range('01-Jan-2013', periods=12, freq='MS')
   ...: ts = pd.TimeSeries(randn(12), index=dates)

In [2]: ts.groupby(lambda key: key[0:4]).first()
It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console.

Tested with pandas 10.1 on win32/win64, Python 2.7 and pandas 0.11.0.dev-2f7b0e4 on win32, Python 2.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions