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>