10000 pandas doesn't work... incomplete codes by HiroTestStudent · Pull Request #226 · UWPCE-PythonCert-ClassRepos/SP_Online_Course2_2018 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 14, 2021. It is now read-only.

pandas doesn't work... incomplete codes #226

Conversation

HiroTestStudent
Copy link
Contributor

Hi Luis,

Pandas causes the error. Error message is below.

Hiroyukis-MacBook-Pro-2:Lesson1 hiroyukitakechi$ python comprehensions.py
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)

Additionally, my sorted() function has an issue too. This is my issue....

Thanks,
Hiro

@ldconejo
Copy link
Contributor
ldconejo commented Sep 6, 2018

Hi Hiro,

As you correctly assumed, I don't see the error with Pandas when trying to run your code. It seems you're seeing a similar issue as listed here:

https://stackoverflow.com/questions/40845304/runtimewarning-numpy-dtype-size-changed-may-indicate-binary-incompatibility

Apparently, it's collateral damage for using a version of scipy that was compiled with an older version of numpy. Try reinstalling scipy by following these instructions:

pip uninstall -y scipy scikit-learn
pip install --no-binary scipy scikit-learn

As for the other issue, take a look at the explanation here:

https://www.pythoncentral.io/how-to-sort-a-list-tuple-or-object-with-sorted-in-python/

Look for Sorting a list of tuples, that's what you need to do in this case: Create a function that will extract the danceability value from each tuple and feed that function as key to the sorted function. I can show you how to do that directly when you create your results variable. We can talk more about it during student hours.

-Luis

@HiroTestStudent
Copy link
Contributor Author

Hi Luis,

I just tried to uninstall and reinstall scikit-learn by following your instruction but still it shows the error message below. I am wondering if I need to reinstall numpy too. I will talk to you during office hours at 8:30pm. Thanks, Hiro

Hiroyukis-MacBook-Pro-2:Lesson1 hiroyukitakechi$ python comprehensions.py
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)

@ldconejo
Copy link
Contributor
ldconejo commented Sep 6, 2018

I found something about it: numpy/numpy#11788

What they say is to ignore the warning for now. Let's take a look during office hours.

-Luis

@ldconejo ldconejo closed this Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0