Repository navigation
Example error #67
Description
The example (https://github.com/ACCLAB/DABEST-python) doesn't work.
python3 0
Traceback (most recent call last):
File "0", line 12, in
iris_dabest.mean_diff.plot();
File "/usr/local/lib/python3.7/site-packages/dabest/_classes.py", line 1258, in plot
out = EffectSizeDataFramePlotter(self, **all_kwargs)
File "/usr/local/lib/python3.7/site-packages/dabest/plotter.py", line 377, in EffectSizeDataFramePlotter
**group_summary_kwargs)
File "/usr/local/lib/python3.7/site-packages/dabest/plot_tools.py", line 162, in gapped_lines
quantiles = data.groupby(x)[y].quantile([0.25, 0.75])
File "/usr/local/lib64/python3.7/site-packages/pandas/core/groupby/groupby.py", line 1953, in quantile
return result.take(indices)
File "/usr/local/lib64/python3.7/site-packages/pandas/core/series.py", line 4432, in take
new_index = self.index.take(indices)
File "/usr/local/lib64/python3.7/site-packages/pandas/core/indexes/multi.py", line 2032, in take
na_value=-1,
File "/usr/local/lib64/python3.7/site-packages/pandas/core/indexes/multi.py", line 2060, in _assert_take_fillable
taken = [lab.take(indices) for lab in self.codes]
File "/usr/local/lib64/python3.7/site-packages/pandas/core/indexes/multi.py", line 2060, in
taken = [lab.take(indices) for lab in self.codes]
IndexError: index 6 is out of bounds for size 6
Requirement already satisfied, skipping upgrade: scipy>=0.14.0 in /usr/local/lib64/python3.7/site-packages (from seaborn) (1.3.1)
Requirement already satisfied, skipping upgrade: matplotlib>=1.4.3 in /usr/local/lib64/python3.7/site-packages (from seaborn) (3.1.1)
Requirement already satisfied, skipping upgrade: numpy>=1.9.3 in /usr/local/lib64/python3.7/site-packages (from seaborn) (1.17.1)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.6.1 in /usr/lib/python3.7/site-packages (from pandas>=0.15.2->seaborn) (2.8.0)
Requirement already satisfied, skipping upgrade: kiwisolver>=1.0.1 in /usr/local/lib64/python3.7/site-packages (from matplotlib>=1.4.3->seaborn) (1.1.0)
Requirement already satisfied, skipping upgrade: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/site-packages (from matplotlib>=1.4.3->seaborn) (2.4.2)
Requirement already satisfied, skipping upgrade: cycler>=0.10 in /usr/local/lib/python3.7/site-packages (from matplotlib>=1.4.3->seaborn) (0.10.0)
Requirement already satisfied, skipping upgrade: six>=1.5 in /usr/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas>=0.15.2->seaborn) (1.12.0)
Requirement already satisfied, skipping upgrade: setuptools in /usr/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib>=1.4.3->seaborn) (41.0.0)
Requirement already up-to-date: pandas in /usr/local/lib64/python3.7/site-packages (0.25.1)
Requirement already satisfied, skipping upgrade: numpy>=1.13.3 in /usr/local/lib64/python3.7/site-packages (from pandas) (1.17.1)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.6.1 in /usr/lib/python3.7/site-packages (from pandas) (2.8.0)
Requirement already satisfied, skipping upgrade: pytz>=2017.2 in /usr/local/lib/python3.7/site-packages (from pandas) (2019.2)
Requirement already satisfied, skipping upgrade: six>=1.5 in /usr/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)
Requirement already up-to-date: dabest in /usr/local/lib/python3.7/site-packages (0.2.5)
Activity
josesho commentedon Sep 6, 2019
Hi,
which version of pandas are you using?
Thanks,
Joses
heikostark commentedon Sep 6, 2019
Requirement already up-to-date: pandas in /usr/local/lib64/python3.7/site-packages (0.25.1)
Requirement already satisfied, skipping upgrade: numpy>=1.13.3 in /usr/local/lib64/python3.7/site-packages (from pandas) (1.17.1)
Requirement already satisfied, skipping upgrade: pytz>=2017.2 in /usr/local/lib/python3.7/site-packages (from pandas) (2019.2)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.6.1 in /usr/lib/python3.7/site-packages (from pandas) (2.8.0)
Requirement already satisfied, skipping upgrade: six>=1.5 in /usr/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)
Best regards,
Heiko
josesho commentedon Sep 6, 2019
Hi,
As seen in #52 and #60 (my bad, I shouldn't have closed these unresolved issues),
dabestdoesn't play properly withpandas=0.25. For now, I would advise usingpandas='0.24.Thanks,
Joses
PS the easiest way to get any package's version is to run
in a Jupyter cell.
lrq3000 commentedon Sep 27, 2019
I get the same error, and probably for the same reason. Any hint on how to fix the issue with pandas >= 0.25?
mje-nz commentedon Oct 1, 2019
@lrq3000 It should be fixed in pandas v0.26.0.dev0, which you can install from source. Why not just downgrade (
pip install "pandas<0.25" --force-reinstall) or use a venv for now though?lrq3000 commentedon Oct 1, 2019
Yes thank you, apparently it's going to be fixed with 0.25.2 minor revision but no ETA, so I'll downgrade meanwhile.
josesho commentedon Oct 2, 2019
@BioinfoTongLI I think you should do what @mje-nz suggests: set up a
conda envorvenv, and either installpandas==0.26.0.dev0from source, or downgrade topandas=0.24. Hope this solves your problem!josesho commentedon Dec 26, 2019
Closed with #89