Jupyter Notebook error when graphing with Seaborn


#1

I’m massively behind schedule and I’m trying to finish my capstone project for my Data Visualization with Python course.

The Slack workspace seems to be dead, so I’ll post my problem here instead.

When I try and run any Seaborn graph whatsoever in a Jupyter Notebook, I get the following error message:

“C:\Users\ffion\Miniconda3\lib\site-packages\scipy\stats\stats.py:1713: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result.
return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval”

If I go onto one of the solution Notebooks provided for some of the projects and run the model code there I get exactly the same error message, so I’m not sure there is actually a problem with the code I’ve written.

Why is this happening?

I don’t understand what the error message even means


DataScience Path Pro: Seaborn Section
#2

Hello @filippaberio,

When you get such warning, it is mostly because the Python version being used has some function/methods that are getting changed (deprectation) in next version.

Based on that, you can see that the error message suggest:

FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)] instead of arr[seq]. In the future this will be interpreted as an array index, arr[np.array(seq)], which will result either in an error or a different result.

So you should use arr[tuple(seq)] instead of arr(seq) so you code doesn’t have problem running any future version of SciPy package.

Also, based on that line of code, I am pretty sure you following this tutorial.

Since it is a recent warning, I had to look to StackOverflow and found a good example about it: future warning example.

Cheers!


#3

What does your response even mean?
I’m pretty sure users who are viewing this thread is learning Seaborn from the data science pro program.
We do what it tells us to do and we this error. Isn’t this a bug on codecademy’s end?
Furthermore, the solution for the lesson is the EXACT same as what is typed. It’s really annoying.


#4

@tonydhsuh,

Regarding …

A feature or usage detail of software is said to be deprecated if it is being phased out and is considered obsolete. When this occurs, users of the software are typically provided with some period of notice, in the form of a message like the one that you saw, asking that they stop using that feature. This usually includes advice on what they could use instead. In some future version of the software, the deprecated feature or manner of usage may no longer work at all.

EDIT - December 3, 2018:

As of now, Codecademy’s installed software is not entirely up to date, so some sort of adjustment needs to be made. I have submitted a bug report to Codecademy. They will need to update some combination of the instructions, installed software, and the submission correctness test (SCT). In any case, the problem is not your fault.