2 ms·
> Pandas's flexibility What you call flexibility I call non-readability: df.ix[0] df.loc["x"] df.loc["x", :] df.iloc[0] df.x df.x[0] df["
by dist-epoch 3y ago
> Pandas's flexibility
What you call flexibility I call non-readability:
df.ix[0]
df.loc["x"]
df.loc["x", :]
df.iloc[0]
df.x
df.x[0]
df["x"]
df[["x"]]
df[df["x"]]
df["x", 0]
df["x"][0]
df[:, 0]
# and probably a few more I forgot
If you stop working with it for 2 months you forget what each one is doing and when you are supposed to use it.
- falcor84 3y agoI'm not clear what your argument is. Many of your examples are just syntactical sugar which you can very easily ignore, and even prohibit in your linter. Also, note that pandas's datafrimes shine when you focus on column operations, if you're finding yourself accessing individual elements by index often, that's usually a sign that you should switch to a more appropriate data structure.
- dist-epoch 3y ago> I'm not clear what your argument is. That when you look at online examples or other people's code you will find all of these variants used.
- falcor84 3y agoLooking at random people's code online is like staring into the abyss. I sometimes see APL code and find myself running in circles and screaming for a bit before I regain my composure, but I don't think that's reason enough for me to complain about APL's design.
- dist-epoch 3y agoThere are alternatives to Pandas, for example Polars doesn't have this problem. Sure, doing an operation in Polars can be more verbose, but it really does have just a few ways of doing things. Which in the end is actually more productive, since you don't need to always google the syntax.