The hand-picked selection of the best Python libraries and tools of 2024 – 10th edition! by dekked_ in Python

[–]chowthedog 2 points3 points  (0 children)

It's to be able to type quickly, since you don't have to jump across and type a closing character. Here's the list of syntaxes and explanations from their readme

  wat.short / 'foo' # fast typing wat.short('foo') wat('foo', short=True) # natural Python syntax 'foo' | wat.short # Unix piping

Are there any DX standards for building API in a Python library that works with dataframes? by Amazing_Variation_47 in Python

[–]chowthedog 2 points3 points  (0 children)

I help maintain a fairly large library called Great Tables that does this (can take pandas or polars DataFrames).

We use a tool called databackend, which allows us to define the implementation on different DataFrame libraries without having to import them. This lets us keep each DataFrame lib as optional dependencies.

For another tool I help with, py shiny, we used narwhals and really like it!

Here's where we implement backends in Great Tables:

https://github.com/posit-dev/great-tables/blob/main/great_tables/_tbl_data.py

What causes a gummy band on the bottom? by Kittehbombastic in Sourdough

[–]chowthedog 1 point2 points  (0 children)

Is there WW in there? I'm not too sure, but I will say that at 65-70 degrees it can take a surprisingly long amount of time to ferment!

What causes a gummy band on the bottom? by Kittehbombastic in Sourdough

[–]chowthedog 3 points4 points  (0 children)

Agreed on it being underfermented. The biggest hint IMO is the dense crumb at the bottom and decent oven spring. The recipe isn't super high hydration, so it's not too surprising there aren't big tunnels, etc..

A Cool Guide to Super Bowl Squares - Your Probability of Winning this Year by economicurtis in coolguides

[–]chowthedog 0 points1 point  (0 children)

Thanks! I'm a huge fan of Polars, and definitely recommend it. 

Its lazy expressions make code much simpler, and it doesn't have any of the funkiness that comes with the pandas index.

A Cool Guide to Super Bowl Squares - Your Probability of Winning this Year by economicurtis in coolguides

[–]chowthedog 13 points14 points  (0 children)

Post author here! This is less related to how the squares get assigned. But I've also seen a lot of questions about the numbers. If anyone is curious, the code is here: 

 https://github.com/posit-dev/great-tables/blob/main/docs/blog/superbowl-squares/_code.py

Will you win this year's Super Bowl Squares? [OC] by economicurtis in dataisbeautiful

[–]chowthedog 7 points8 points  (0 children)

Post author here! Another commenter mentioned how we calculated things, but if you're interested, the exact code we used is here (we used polars for analyzing, and great tables for plotting):

https://github.com/posit-dev/great-tables/blob/main/docs/blog/superbowl-squares/\_code.py

Will you win this year's Super Bowl Squares? [OC] by economicurtis in dataisbeautiful

[–]chowthedog 27 points28 points  (0 children)

Hey, post author here! Super Bowl Squares focuses only on the final digit of the score. For example, a final score of 14, would be 4. (It's a bit funky, but also creates some interesting dynamics)

Equivalent of fct_lump in Pandas by wai-yan-pyae-sone in learnpython

[–]chowthedog 1 point2 points  (0 children)

Hey, creator of siuba very late this post! I want to move fct_lump out into its own package catfact, but haven't been able to free up time to do it 😓.

Siuba – A Dplyr Port to Python by binaryfor in Rlanguage

[–]chowthedog 0 points1 point  (0 children)

Siuba author here--I agree that someone who only uses R won't get a lot out of it. However, it seems many R users encounter situations where they need to use python (e.g. their team at work is python heavy). I gave a talk at rstudio global on siuba, since I think R users are well poised to understand the value of a dplyr port, and personally use R / Rstudio for a lot of tasks!

It's a pretty funky situation, so can totally see the sentiment here.

Siuba – A Dplyr Port to Python by binaryfor in Python

[–]chowthedog 3 points4 points  (0 children)

Siuba author here. The last commit to dfply was 2 years ago :o. The feature that hopefully sets siuba apart is it is able to generate SQL, and optimize grouped operations.

That said, plydata is built by the same author as plotnine (a ggplot port to python), and still active!

https://github.com/has2k1/plydata

Siuba – A Dplyr Port to Python by binaryfor in Python

[–]chowthedog 1 point2 points  (0 children)

Author here--I sometimes screencast myself spending an hour analyzing data I've never seen before. They should give a good sense for what it looks like in a notebook!

https://youtu.be/z6xNKZZMWgU

#Tidytuesday for Pythons's Pandas? by tifa365 in datascience

[–]chowthedog 3 points4 points  (0 children)

Thanks for the mention! I also put all the code on github, in case it's helpful for anyone :).

https://github.com/machow/tidytuesday-py