question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

plotting fails in pandas==0.25.0

See original GitHub issue

Issue Description

Same code works in pandas==0.24.0 When updated to 0.25.0 it fails and return the following error:

Traceback (most recent call last):
......
  File "/home/tongli/miniconda3/envs/maars/lib/python3.7/site-packages/dabest/_classes.py", line 1235, in plot
    out = EffectSizeDataFramePlotter(self, **all_kwargs)
  File "/home/tongli/miniconda3/envs/maars/lib/python3.7/site-packages/dabest/plotter.py", line 377, in EffectSizeDataFramePlotter
    **group_summary_kwargs)
  File "/home/tongli/miniconda3/envs/maars/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 "/home/tongli/miniconda3/envs/maars/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 1908, in quantile
    interpolation=interpolation,
  File "/home/tongli/miniconda3/envs/maars/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 2248, in _get_cythonized_result
    func(**kwargs)  # Call func to modify indexer values in place
  File "pandas/_libs/groupby.pyx", line 692, in pandas._libs.groupby.group_quantile
TypeError: must be real number, not list

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
joseshocommented, Dec 26, 2019

Closed with #89

1reaction
BioinfoTongLIcommented, Jul 29, 2019

Hello, FYI, this is not an issue causes by dabest. Something is broken while Cythonizing the groupby.quantile in the version 0.25 of Pandas. https://github.com/pandas-dev/pandas/pull/20405#issue-175799676 https://github.com/pandas-dev/pandas/issues/27526#issue-471367450 I believe the best solution, in short term, is to force people stay at 0.24

Read more comments on GitHub >

github_iconTop Results From Across the Web

pandas.DataFrame.plot gives matplotlib import error
Try plt.plot(df['Adj. Close'].tolist()).
Read more >
Chart visualization — pandas 1.5.2 documentation - PyData |
As a str indicating which of the columns of plotting DataFrame contain the error values. As raw values ( list , tuple ,...
Read more >
Visualizing error log with pandas and Plotly
Recently I received a dataset from a performance measurement containing data about processing time and errors. After a brief look, ...
Read more >
How to Fix in Pandas: TypeError: no numeric data to plot
This error occurs when you attempt to plot values from a pandas DataFrame, but there are no numeric values to plot. This error...
Read more >
Python Plotting Tutorial w/ Matplotlib & Pandas (Line Graph ...
Practice your Python Pandas data science skills with problems on StrataScratch!https://stratascratch.com/?via=keithIn this video, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found