Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'pandas.core.algorithms' has no attribute 'quantile' #17

Open
anandece4u opened this issue Jun 21, 2022 · 10 comments

Comments

@anandece4u
Copy link

Hi Sundar,

After running following code :
from xverse.transformer import MonotonicBinning
clf = MonotonicBinning()
clf.fit(X, y)

I am getting AttributeError: module 'pandas.core.algorithms' has no attribute 'quantile' error. Any help will be appreciated.

Thanks

@anandece4u
Copy link
Author

pandas version 1.4.2
numpy version 1.21.0
python version 3.9.12
I am using Anaconda

@player1024
Copy link

same issue here, had to downgrade to pandas==1.3.5 to make it work

@ximua00
Copy link

ximua00 commented Jul 4, 2022

Same issue here, downgrading works for me as well.

@sridharsdvk
Copy link

Same issue here, downgrading works for me as well.

Getting same error in May 23.
Is this issue resolved?
Can't downgrade python verson.
If so What is the sol?

@surzua
Copy link

surzua commented Aug 8, 2023

            #bins = algos.quantile(X, np.linspace(0, 1, force_bins)) #creates a new binnning based on forced bins
            bins = X.quantile(np.linspace(0, 1, force_bins)).values #creates a new binnning based on forced bins

Hi, you can fix that in this way

@apavlo89
Copy link

            #bins = algos.quantile(X, np.linspace(0, 1, force_bins)) #creates a new binnning based on forced bins
            bins = X.quantile(np.linspace(0, 1, force_bins)).values #creates a new binnning based on forced bins

Hi, you can fix that in this way

No it doesn't despite what chatgpt recommends you do ;)

@surzua
Copy link

surzua commented Aug 17, 2023

Who said that comes from chatgpt?
I'm working with this library and this is my fix.
If it's wrong, please provide the correct answer.

@Yashstar123
Copy link

It is saying force_bins is not defined

@AnshuTrivedi
Copy link

same issue here, had to downgrade to pandas==1.3.5 to make it work

Thank you it helped me!

@IgnacioMB
Copy link

IgnacioMB commented Jan 11, 2024

            #bins = algos.quantile(X, np.linspace(0, 1, force_bins)) #creates a new binnning based on forced bins
            bins = X.quantile(np.linspace(0, 1, force_bins)).values #creates a new binnning based on forced bins

Hi, you can fix that in this way

thanks! this worked for me :) I use Pandas v1.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants