sigmoid.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A social space for people researching, working with, or just interested in AI!

Server stats:

598
active users

#polars

0 posts0 participants0 posts today
Erik-Jan<p>I was annoyed that there is no "expand_grid()" function in :python: <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> as in :rstats: <a href="https://fosstodon.org/tags/RStats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>RStats</span></a> <a href="https://fosstodon.org/tags/tidyverse" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tidyverse</span></a> </p><p>So I just published a small package on <a href="https://fosstodon.org/tags/PyPI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyPI</span></a> !</p><p>Introducing polarsgrid<br><a href="https://pypi.org/project/polarsgrid/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">pypi.org/project/polarsgrid/</span><span class="invisible"></span></a></p><p>Using the excellent <a href="https://fosstodon.org/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> 🐻‍❄️ package, easily create a table with product of factors: </p><p>from polarsgrid import expand_grid<br>expand_grid(a=[1, 2, 3], b=["x", "y"])</p><p>Yields all combinations of its inputs as a <a href="https://fosstodon.org/tags/DataFrame" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DataFrame</span></a></p><p>It can also produce a <a href="https://fosstodon.org/tags/LazyFrame" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>LazyFrame</span></a> for streaming extra-big tables to disk</p>
Jim Gardner<p>During this week's Data Science team CPD session I realised that a bit of old R code I wrote could be streamlined, and the base R to Python Polars comparison continued.</p><p><a href="https://jimgar.github.io/posts/cpd-jul-2025/post.html#section-1" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">jimgar.github.io/posts/cpd-jul</span><span class="invisible">-2025/post.html#section-1</span></a></p><p><a href="https://hachyderm.io/tags/rStats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rStats</span></a> <a href="https://hachyderm.io/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://hachyderm.io/tags/Polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Polars</span></a> <a href="https://hachyderm.io/tags/AoC2024" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>AoC2024</span></a></p>
Data Science<p>Polars is a lightning fast DataFrame library/in-memory query engine with parallel execution and cache efficiency. And now you can use is with the tidyverse syntax: <a href="https://www.tidypolars.etiennebacher.com/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">tidypolars.etiennebacher.com/</span><span class="invisible"></span></a> <a href="https://genomic.social/tags/rstats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rstats</span></a> <a href="https://genomic.social/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> <a href="https://genomic.social/tags/optimisation" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>optimisation</span></a></p>
Jim Gardner<p>New blog post: Comparing Advent of Code 2024 day 1 part 1 solutions in base R and Python Polars.</p><p><a href="https://jimgar.github.io/posts/cpd-jul-2025/post.html" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">jimgar.github.io/posts/cpd-jul</span><span class="invisible">-2025/post.html</span></a></p><p>Did a bit of CPD with my team at work this week. We revisited the first problem from Advent of Code 2024. Last year I solved it using base R, so I decided to use Python Polars this time and compare the outputs.</p><p>Along the way I got a tiny bit more familiar with using uv, and I finally had to learn what structs are in Polars! Turns out they're pretty simple to understand.</p><p><a href="https://hachyderm.io/tags/rStats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rStats</span></a> <a href="https://hachyderm.io/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://hachyderm.io/tags/Polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Polars</span></a></p>
Edward :mastocol:<p>Unas semanas bien pesadas, pero con cosas interesantes que he probado en el trabajo.<br>- <a href="https://col.social/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> : Definitivamente mi herramienta para dataframes por defecto, después de habituarse a las formas nativas esto es muy claro y eficiente.<br>- Depurador de <a href="https://col.social/tags/zed" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>zed</span></a>: Aunque no he podido lograr que funcione la forma de anexar un proceso en ejecución, el modo de lanzar proceso resulta muy directo, y la interfaz para explorar las variables y la consola de interacción integrada funcionan muy bien<br><a href="https://col.social/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://col.social/tags/mastodevs" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>mastodevs</span></a></p>
Talk Python Podcast<p>Latest episode with Christopher Trudeau and host <span class="h-card" translate="no"><a href="https://fosstodon.org/@mkennedy" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>mkennedy</span></a></span> on <a href="https://fosstodon.org/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/datascience" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>datascience</span></a> </p><p>#510: 10 Polars Tools and Techniques To Level Up Your Data Science</p><p><a href="https://talkpython.fm/episodes/show/510/10-polars-tools-and-techniques-to-level-up-your-data-science" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">talkpython.fm/episodes/show/51</span><span class="invisible">0/10-polars-tools-and-techniques-to-level-up-your-data-science</span></a></p>
Posit<p>Great Tables is the <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> library for creating display-ready tables from your <a href="https://fosstodon.org/tags/Polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Polars</span></a> DataFrames and more.</p><p>In their three-part video series, Michael Chow and <span class="h-card" translate="no"><a href="https://fosstodon.org/@rich_i" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>rich_i</span></a></span> show how to add structure, formatting, and styling to elevate your tables beyond the default.</p><p>Explore the details: <a href="https://posit.co/blog/level-up-great-tables/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">posit.co/blog/level-up-great-t</span><span class="invisible">ables/</span></a></p>
Francois Dion<p>Picked up "Python Polars the definitive guide" by Jeroen Janssens and Thijs Nieuwdorp. The polar bear was already used on another O'Reilly book, but the Iberian lynx is cool.</p><p>Never sure how tech books will pan out, but Jeroen's book data science at the command line was a good one, so I am hopeful.</p><p><a href="https://mastodon.online/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://mastodon.online/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> <a href="https://mastodon.online/tags/dataframes" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dataframes</span></a> <a href="https://mastodon.online/tags/datascience" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>datascience</span></a> <a href="https://mastodon.online/tags/DataEngineering" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DataEngineering</span></a> <a href="https://mastodon.online/tags/dataops" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dataops</span></a> <a href="https://mastodon.online/tags/book" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>book</span></a> <a href="https://mastodon.online/tags/books" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>books</span></a> <a href="https://mastodon.online/tags/computerscience" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>computerscience</span></a> <a href="https://mastodon.online/tags/analytics" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>analytics</span></a></p>
Talk Python Podcast<p>We have a brand-new <a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://fosstodon.org/tags/datascience" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>datascience</span></a> <a href="https://fosstodon.org/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> course! Please give it a look.</p><p>Polars for Power Users: Transform Your Data Analysis Game</p><p><a href="https://training.talkpython.fm/courses/polars-for-power-users" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">training.talkpython.fm/courses</span><span class="invisible">/polars-for-power-users</span></a></p>
Francois Dion<p>Anybody using the narwhals <a href="https://mastodon.online/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> package for <a href="https://mastodon.online/tags/dataframe" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dataframe</span></a> manipulations?</p><p>Very comfortable with <a href="https://mastodon.online/tags/pandas" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pandas</span></a> and <a href="https://mastodon.online/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> syntax, but although <a href="https://mastodon.online/tags/narwhals" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>narwhals</span></a> is supposed to be very close to polars, it is a subset and I find that there is a lot of basic stuff missing. Trying to figure out how to get the first part of a str.split.</p><p>in pandas I just add .str[0] and in polars .list.get(0)</p><p>with narwhals neither approaches are implemented. Any idea as what is supported in narwhals to do this?<br><a href="https://mastodon.online/tags/programming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>programming</span></a></p>
young man yells at the cloud<p>If anyone is looking at using <a href="https://mastodon.social/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> for dataframes in <a href="https://mastodon.social/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a> , having done it myself for a few months at work, here are my thoughts:</p><p>1. It works and it's fast. I'd use it again.<br>2. The /rust-specific/ documentation is really barebones. However, the python docs are good, so you can read those and the translation isn't too bad. However, this is definitely the largest pain point.</p><p>If anyone has any questions about using the crate, feel free to ask and I'll answer if I can!</p>
Michael Sumner<p>wow, <a href="https://rstats.me/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> is good - just read-from-url filter/select/unique super straightforward</p><p><a href="https://rstats.me/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a></p>
narkode<p>I am transforming a project from <a href="https://nerdculture.de/tags/pandas" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pandas</span></a> to <a href="https://nerdculture.de/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> and I already like it! I don't want to talk bad about <a href="https://nerdculture.de/tags/pandas" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pandas</span></a>, it did a lot for the data science community. But, beside of being blazingly fast, the syntax of <a href="https://nerdculture.de/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> is much more logic and consistent!</p>
Towards Data Science<p>Struggling with slow GIS processing? Tony Albanese's article demonstrates a lightning-fast method for generating transects using <a href="https://hachyderm.io/tags/Geopandas" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Geopandas</span></a> and <a href="https://hachyderm.io/tags/Polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Polars</span></a>, reducing processing time from days to seconds. </p><p><a href="https://towardsdatascience.com/harnessing-polars-and-geopandas-to-generate-millions-of-transects-in-seconds-d37b176a0b57/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">towardsdatascience.com/harness</span><span class="invisible">ing-polars-and-geopandas-to-generate-millions-of-transects-in-seconds-d37b176a0b57/</span></a></p>
Cuducos<p>Do I know any <a href="https://tech.lgbt/tags/Polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Polars</span></a> contributor or maintainer? I would love to help with that bug/exploration, but I am not sure where to start!</p><p><a href="https://github.com/pola-rs/polars/issues/21851" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pola-rs/polars/issu</span><span class="invisible">es/21851</span></a> <a href="https://tech.lgbt/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://tech.lgbt/tags/Rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rust</span></a></p>
EuroSciPy<p>Working on core array computing libraries that power <a href="https://fosstodon.org/tags/scientificPython" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>scientificPython</span></a>? <a href="https://fosstodon.org/tags/EuroSciPy2025" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>EuroSciPy2025</span></a> wants your proposals on optimized array operations, vectorization techniques, and numerical foundations. Submit your groundbreaking work!</p><p><a href="https://pretalx.com/euroscipy-2025/cfp" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">pretalx.com/euroscipy-2025/cfp</span><span class="invisible"></span></a></p><p><a href="https://fosstodon.org/tags/ScientificComputing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ScientificComputing</span></a> <a href="https://fosstodon.org/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://fosstodon.org/tags/EuroSciPy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>EuroSciPy</span></a> <a href="https://fosstodon.org/tags/numpy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>numpy</span></a> <a href="https://fosstodon.org/tags/scipy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>scipy</span></a> <a href="https://fosstodon.org/tags/pandas" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pandas</span></a> <a href="https://fosstodon.org/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a></p>
Data Science<p>Polars is a lightning fast DataFrame library/in-memory query engine with parallel execution and cache efficiency. And now you can use is with the tidyverse syntax: <a href="https://www.tidypolars.etiennebacher.com/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">tidypolars.etiennebacher.com/</span><span class="invisible"></span></a> <a href="https://genomic.social/tags/rstats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rstats</span></a> <a href="https://genomic.social/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a> <a href="https://genomic.social/tags/optimisation" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>optimisation</span></a></p>
Mainmatter<p>🌊&nbsp; Kisters provides real-time flood warnings—but traffic spikes made scaling costly. We helped them build a Rust-based system using Polars to process data efficiently across servers, edge, and browsers (WASM)—keeping performance high and costs low.</p><p>Read more ➡️ <a href="https://mainmatter.com/cases/kisters/?utm_source=linkedin" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mainmatter.com/cases/kisters/?</span><span class="invisible">utm_source=linkedin</span></a> </p><p><a href="https://fosstodon.org/tags/rustlang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rustlang</span></a> <a href="https://fosstodon.org/tags/WASM" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WASM</span></a> <a href="https://fosstodon.org/tags/edgecomputing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>edgecomputing</span></a> <a href="https://fosstodon.org/tags/cloudoptimization" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>cloudoptimization</span></a> <a href="https://fosstodon.org/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a></p>
Wolf<p>At last night’s <span class="h-card" translate="no"><a href="https://hachyderm.io/@mug" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>mug</span></a></span> meeting we looked at a lot of different solutions to <a href="https://hachyderm.io/tags/adventofcode" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>adventofcode</span></a> day 1 in many different languages. Two that were very interesting to me were <a href="https://hachyderm.io/tags/Zig" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Zig</span></a> and <a href="https://hachyderm.io/tags/haskell" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>haskell</span></a>. The way these two languages worked was really quite fascinating. After seeing real code in these two languages, I can tell they are not for me; but they were interesting and illuminating nonetheless. </p><p>There was a solution entirely in <a href="https://hachyderm.io/tags/SQL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SQL</span></a>. Another in <a href="https://hachyderm.io/tags/vim9script" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>vim9script</span></a>. Another in <a href="https://hachyderm.io/tags/swiftlang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swiftlang</span></a> <a href="https://hachyderm.io/tags/swift" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>swift</span></a> (I don’t think that one’s in the repo yet). I wrote several implementations myself. The one I felt most proud of is <a href="https://hachyderm.io/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> with the core written in <a href="https://hachyderm.io/tags/rustlang" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rustlang</span></a> <a href="https://hachyderm.io/tags/rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rust</span></a> tied together with <a href="https://hachyderm.io/tags/PyO3" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyO3</span></a>. The one I felt was maybe the best tool for the job was entirely based on <a href="https://hachyderm.io/tags/pandas" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pandas</span></a>. As I said in a previous post, I tried to solve it in <a href="https://hachyderm.io/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a>, but the API exposed by Polars at least as far as I could tell, made it no better than simple lists in Python. I need to get deeper knowledge here. </p><p>The repo lives here: <a href="https://github.com/MichiganUnixUserGroup/MUG-2025-03-11-Advent-of-Code" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/MichiganUnixUserGro</span><span class="invisible">up/MUG-2025-03-11-Advent-of-Code</span></a>.</p>
Eric R. Scott<p>There are now so many "backends" for {dplyr}—duckdb with {duckplyr}, polars with {tidypolars}, various database engines with {dbplyr}, {data.table} with {dtplyr}. Is there a blog post or flow chart somewhere with pros and cons of each? Like, comparisons of memory requirements, speed, and how likely they are to "just work"?</p><p><a href="https://fosstodon.org/tags/rstats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rstats</span></a> <a href="https://fosstodon.org/tags/duckdb" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>duckdb</span></a> <a href="https://fosstodon.org/tags/dplyr" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>dplyr</span></a> <a href="https://fosstodon.org/tags/tidyverse" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>tidyverse</span></a> <a href="https://fosstodon.org/tags/polars" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>polars</span></a></p>