Exception raised when attempting to call a unsupported numpy function.
For example, np.cumsum(groupby_object).
Examples
>>> df = pd.DataFrame({"A": [0, 0, 1, 1],
... "B": ["x", "x", "z", "y"],
... "C": [1, 2, 3, 4]}
... )
>>> np.cumsum(df.groupby(["A"]))
Traceback (most recent call last):
UnsupportedFunctionCall: numpy operations are not valid with groupby.
Use .groupby(...).cumsum() instead
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.errors.UnsupportedFunctionCall.html