Open Hankins44 opened 1 year ago
I just downloaded the plotlytools.py from the Cufflinks GitHub site: https://github.com/santosjorge/cufflinks/tree/master/cufflinks Copy it into my pkg directory. This file was already updated for Pandas 2.0.x.
If you do not know where your cufflinks is installed, use pip install -U cufflinks to find out.
File ~\datasci\lib\site-packages\cufflinks\plotlytools.py:849, in _iplot.<locals>.<lambda>(x) 847 if kind=='spread': 848 trace=self.apply(lambda x:x[0]-x[1],axis=1) --> 849 positive=trace.apply(lambda x:x if x>=0 else pd.np.nan) 850 negative=trace.apply(lambda x:x if x<0 else pd.np.nan) 851 trace=pd.DataFrame({'positive':positive,'negative':negative}) AttributeError: module 'pandas' has no attribute 'np'
faced the same thing today, took a look at the code and thought "ta hell?".
this is actually fixed as of today, but the fix hasn't been pushed to pipy so the version u get get from pip install is broken.
I would suggest using pip install cufflinks1
Took me a while to find this! Very helpful thank you!
Versions
Python: 3.10.5
Pandas: 2.0.2
Plotly: 5.14.1
Cufflinks: 0.17.3
Issue
When running the following:
``` python df[['A','B']].iplot(kind='spread') ```I get the following error:
``` python File ~\datasci\lib\site-packages\cufflinks\plotlytools.py:849, in _iplot.