Skip to content

ohlc not available for groupby/etc #6594

Closed
@hayd

Description

@hayd

Was this available at some stage (it's looking in self._cython_functions for it rather than just saying no dice with a plain ol' AttributeError):

In [1]: rng = pd.date_range('2012', periods=3)

In [2]: df = pd.DataFrame([[1, 2], [1, 3], [5, 6]], rng, columns=['A', 'B'])

In [3]: g = df.groupby('A')

In [4]: g.foo()
AttributeError: 'DataFrameGroupBy' object has no attribute 'foo'

In [5]: g.ohlc()
KeyError: 'ohlc'

In [6]: g.ohlc(rule='D')
TypeError: ohlc() got an unexpected keyword argument 'rule'

Can do atm using g.resample('D', how='ohlc').

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandasGroupbyResampleresample methodTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions