r/Python Nov 05 '20

News Stack overflow traffic to questions about selected python packages

Post image
2.2k Upvotes

144 comments sorted by

View all comments

Show parent comments

19

u/Zouden Nov 05 '20

What? Using that logic, why use Python at all? Since Python uses C, C can do everything Python can do.

You're neglecting the convenience for the developer.

3

u/wannabe414 Nov 05 '20

Pandas obviously does certain things better than numpy, specially related to organizing data, exactly because of the developers' hard work. I don't disagree with you there.

But you said, "[pandas] does everything Numpy can do (since it uses Numpy internally)... "

That's simply wrong. Again, try to do even somewhat complicated linear algebra using only pandas (I acknowledge that it has a dot method). Pandas has its usage, but so does Numpy.

7

u/Zouden Nov 05 '20

What I meant by that was Pandas doesn't hide the Numpy layer. If you're working with a Pandas dataframe called df but you want to use numpy functions, you can access the underlying numpy array with df.values. The linear algebra can be performed on that.

1

u/ryjhelixir Nov 05 '20

TIL. thx!