Coder Social home page Coder Social logo

Comments (2)

rhshadrach avatar rhshadrach commented on June 14, 2024 1

Thanks for investigating @Aloqeely - #57444 is changing long standing intentional behavior, so must be done in a major release.

We could patch this by doing the lookup as a try-except, since anytime it would fail we would want to use the function as-is anyways. But because this isn't a regression, I think we should just wait until 3.0 resolves it.

from pandas.

Aloqeely avatar Aloqeely commented on June 14, 2024

Thanks for the report! I am unable to reproduce this on main but I am able to reproduce on latest release 2.2.2
This seems to be caused by the following in pandas/core/groupby/groupby.py apply function:

orig_func = func
func = com.is_builtin_func(func)
if orig_func != func:
    alias = com._builtin_table_alias[orig_func]
    warn_alias_replacement(self, orig_func, alias)

Which internally was checking for whether or not the apply func you provided was deprecated or not by checking if it exists in the _builtin_table dictionary, and since dictionary keys must be hashable, _builtin_table.get(arg, arg) raised TypeError: unhashable type: 'Multiple'

I think this was fixed in #57444 which just enforced the deprecation and removed this check.
I would've called for a backport if this was fixed intentionally but I don't know what to do here. cc @rhshadrach

from pandas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.