Skip to content

BUG: Cumprod failing with type float[pyarrow] #52085

Closed
@misantroop

Description

@misantroop

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

ser = pd.Series({
    1: 1.,
    2: 2.
})
ser = ser.astype('float[pyarrow]')
ser.cumprod()

Issue Description

Cumprod failing, issue or cumprod only meant to be used with np?

File ~/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pandas/core/arrays/base.py:1406, in ExtensionArray._accumulate(self, name, skipna, **kwargs)
   1376 def _accumulate(
   1377     self, name: str, *, skipna: bool = True, **kwargs
   1378 ) -> ExtensionArray:
   1379     """
   1380     Return an ExtensionArray performing an accumulation operation.
   1381 
   (...)
   1404     NotImplementedError : subclass does not define accumulations
   1405     """
-> 1406     raise NotImplementedError(f"cannot perform {name} with type {self.dtype}")

NotImplementedError: cannot perform cumprod with type float[pyarrow]

Expected Behavior

Cumprod result.

Installed Versions

Built from latest from 4 hours ago (b5aec87)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arrowpyarrow functionalityBugUpstream issueIssue related to pandas dependency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions