3 ms·
This addresses some of my misgivings with pandas: https://tomaugspurger.github.io/method-chaining.html https://tomaugspurger.github.io/method-chaining.html
by radus 4y ago
This addresses some of my misgivings with pandas: https://tomaugspurger.github.io/method-chaining.html https://tomaugspurger.github.io/method-chaining.html
- singhrac 4y agoI had time to read through this, thank you for linking it to me. I like method chaining, and appreciate the terseness of the syntax. I don't think it addresses my main complaint (and other's complaints, below) about Pandas. I'll write a lengthy comment here in the hopes that a Pandas/Polars maintainer sees it and gets some inspiration. One big issue I see with Pandas is that it assumes that I want multidimensional keys represented via axes labels on some sort of grid (or hypercube). This is evident from the __getitem__ interface, which is frankly confusing. In reality, selection is the most important detail, and managing columns is just a nice-to-have. Pandas's MVP is the Series object, not DataFrame. In article #1 in your link, "SettingWithCopy" is emblematic of the issue that happens when you allow mutability, so mutability delenda est. This is why FridgeSeal is confused below. One day I'll write a blog post about ways Pandas could be better, but in the meantime I will probably monkey patch a lot of the nonsense out.