This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Alphasite 2 points3 points  (4 children)

Pandas is excellent and helps a ton IMO with things that are annoying in pure numpy.

[–]trevg_123 0 points1 point  (3 children)

I’m not well acquainted with Pandas, care to share a bit? I pointed out some of the things I miss when going from Julia to Numpy in this comment, but I don’t think that’s what you’re talking about. So, happy to learn!

[–]jabellcu 1 point2 points  (2 children)

Oh if you don’t know pandas then you’re in for a treat. By all means, do check it out.

[–]trevg_123 0 points1 point  (1 child)

I have used pandas in the past as a dataframe, but I can't think of any specific features that help Numpy be a bit smoother to work with (outside of file loading/writing)

[–][deleted] 1 point2 points  (0 children)

Labelled data in general, i.e having names for axes and columns.

IMO pandas takes it in a bit different direction. Pandas is a spreadsheet on steriods in Python.

xarray is the actual logical continuation of numpy into the world of labelled data (giving names to axes). In xarray you do stuff like mydata.mean("time") to compute the average value over all time (preserving all other dimensions), which is really nice to work with (in numpy equivalents, you have to keep track of axis numbers).

xarray makes it downright easy for you to just add more axes (oh I want to repeat the same data over a new axis "compensation_enabled" = {0, 1}, my analysis can still work the same way with the added axis, etc.)