BTW Twitter penalizes links as well.
1,471 karma · joined April 1, 2011
BTW Twitter penalizes links as well.
(sales
.assign(country_median=lambda df_: (
df_.groupby("country")["amount"].transform("median")
))
.query("amount <= country_median * 10")
.assign(net=pd.col('amount') - pd.col('discount'))
.groupby("country", as_index=False)
.agg(total=("net", "sum"))
)It's late here, I'm going to bed, perhaps I'll write the code tomorrow when I'm at my laptop and not on my phone.
Lots of folks complain about it before using it. After they use it it is a non issue.
If it really is an issue (and it generally isn't a cause of vectorization removal when used correctly) and you can't get over the syntactic noise if the lambda, pandas 3 introduced pd.col (that work in most (I filed a big about some exceptions) places when you'd use lambda).
I reported many bugs to both pandas and polars over the years and both teams tend to address relatively big ones. (Still have some outstanding pandas bugs that I think are a big deal but the devs disagree.)
This and the decision not to natively plot with matplotlib keep me in pandas for most tasks. (Plus there's is still a relatively large demand for pandas training.)
I still prefer (and use) Pandas for EDA. I think matplotlib integration is a better choice for most viz.
Also, I'm probably in the top 3-5 worldwide for number of folks I've trained with pandas. I offer Polars training and there is little demand for it.
Use SQL if you need to move data around.
I agree that the API has warts, though typically it is more concise than polars.
Pandas is not perfect, it has a bunch of warts. But it is good enough for most. (And many of those folks are using Excel or tableau or power bi... These were the types I was training this week).
If you have medium data, migrating from pyarrow backed pandas to duck or Polars is trivial.
My thought was I'd love to set an HR zone and then connect it to my e-MTB and have it change power to keep me in a zone.
The refresh rate on my device was horrible, and the models (this was a few months ago) struggled to create a historical line plot of my HR.
Crawling through Reddit or forums to find the right incantation to run a model is frustrating.
Right now it is a pain to find the correct incantation.
It sounds like you have found useful tools in adulthood.
Asking because...