Sundar0989 / XuniVerse

xverse (XuniVerse) is collection of transformers for feature engineering and feature selection
MIT License
114 stars 37 forks source link

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

Open anandece4u opened 2 years ago

anandece4u commented 2 years ago

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 commented 2 years ago

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

player1024 commented 2 years ago

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

ximua00 commented 2 years ago

Same issue here, downgrading works for me as well.

sridharsdvk commented 1 year ago

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 commented 11 months ago
            #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 commented 11 months ago
            #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 commented 11 months ago

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 commented 9 months ago

It is saying force_bins is not defined

AnshuTrivedi commented 7 months ago

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

Thank you it helped me!

IgnacioMB commented 6 months ago
            #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