Skip to content

Comment on Tips for saving memory with Pandas

Comments

It’s useful to point out pitfalls of lower precision too. I don’t usually see these articles go over that.

Operations on a few million rows of float32s can give strange results. For example when summing. Df[“colA”].sum() can be fairly different than df.sort_index()[“colA”].sum(). It’s a trap for the unwary.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.