HNHacker News
TopNewBestAskShowJobs

__mharrison__

1,471 karma · joined April 1, 2011

Effective Pandas, Effective Polars, Effective XGBoost, Effective Visualization, and Effective Testing author. Mountain, Frisbee sports. Corporate trainer help your team level up w/ AI, pydata ecosystem https://store.metasnake.com @__mharrison__
submissionscomments
__mharrison__··on LinkedIn Larpmaxxing
I've been in multiple workshops for creators that were ran by LinkedIn. They have all mentioned not to use links.

BTW Twitter penalizes links as well.

__mharrison__··on Pandas Should Go Extinct
I misspoke, you need to use .groupby/.transform to add a new filtering column:

    (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"))
    )
__mharrison__··on Pandas Should Go Extinct
Would love to see examples.
__mharrison__··on Pandas Should Go Extinct
I'm confused, you can use filter after a groupby in pandas...

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.

__mharrison__··on Pandas Should Go Extinct
Those are generally rules of thumbs for data pipelines. (Plus duckdb can read Excel these days I think).
__mharrison__··on Pandas Should Go Extinct
This is a common complaint I get all the time (heard it this week while teaching pandas). I compare this to whitespace indentation in Python.

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).

__mharrison__··on Pandas Should Go Extinct
I looked at your code very quickly, but it looks like you need to use .filter after a .groupby...
__mharrison__··on Pandas Should Go Extinct
Did you ever report these issues to polars developers?

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.)

__mharrison__··on Pandas Should Go Extinct
Most of the time it works, but there are still corner cases throughout the python ML ecosystem where polars fails.

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.)

__mharrison__··on Pandas Should Go Extinct
Rewriting pandas to polars is relatively trivial for most tasks these days. Especially if you wrote your pandas code correctly.

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.

__mharrison__··on Pandas Should Go Extinct
Use pandas if you want advanced analytics, visualization, or ml.

Use SQL if you need to move data around.

__mharrison__··on Pandas Should Go Extinct
If you learn to write pandas correctly you end up writing it very similar to polars (or tidyverse).

I agree that the API has warts, though typically it is more concise than polars.

__mharrison__··on Pandas Should Go Extinct
Most folks just need to learn how to use pandas well and that will open enough doors. Then they can move to polars or duck if needed.
__mharrison__··on Pandas Should Go Extinct
I'm in the middle of wrapping up the edits for Effective Pandas 3rd Edition. (I also wrote a Polars book and just wrapped up a weeklong training session on pandas this week.)

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.

__mharrison__··on DaVinci Resolve 21.1
I spent a few tokens last year trying to create a Python lib for native (undocumented) Resolve files. I was making progress, but it was slow (I ended up scripting Resolve in different ways). I imagine that current models could reverse-engineer the native file format relatively quickly.
__mharrison__··on DaVinci Resolve 21.1
Highly recommend the studio version. The ability to edit by transcript is worth the price alone.
__mharrison__··on DaVinci Resolve 21.1
I thought DaVinci Resolve could automatically sync camera footage for a few years now. I did it about 4 years ago.
__mharrison__··on DaVinci Resolve 21.1
I had AI write a program to edit with resolve. It does transcription, looks at the transcript and decides where to make cuts. If does a decent job and saves me a bunch of time.
__mharrison__··on Ask HN: Resources to get good at soldering?
Build a keyboard. By the end you should be well aware with soldering (and how to remove parts that you put on the wrong side of the PCB).
__mharrison__··on Show HN: Open-Source eInk Bike Computer
Very cool. I was messing around vibe-coding an HR monitor on a LilyGo T5.

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.

__mharrison__··on Pre-Release of Polars 2.0
This is the way. Favor keyword arguments to alias.
__mharrison__··on A browser-based viewer for Office Open XML documents
The top of the readme says it's written by AI
__mharrison__··on Run Qwen3.8 27B locally: real numbers from my Mac Studio
This is a problem that Hugging Face could easily help solve.

Crawling through Reddit or forums to find the right incantation to run a model is frustrating.

__mharrison__··on M5Stack Launches PaperMono
Yes, I was wondering if this was the Gameboy (capable) hardware.
__mharrison__··on Nvidia agrees to acquire Hugging Face for $13B
The lowest hanging fruit that hf could offer is community monitored commands for running local models.

Right now it is a pain to find the correct incantation.

__mharrison__··on typ.ing
Why? They brought columnar lately to the mass(es).
__mharrison__··on typ.ing
Not sure why framework doesn't do this...
__mharrison__··on Why aren't smart people happier? (2022)
Thanks for sharing. Parenting is hard.

It sounds like you have found useful tools in adulthood.

__mharrison__··on AI boosted homework scores, then exam scores dropped: study
Yep, learning is hard work.
__mharrison__··on Why aren't smart people happier? (2022)
Would you have preferred another label? If so, which one?

Asking because...

Page 1 of 31Next →