MENU

Fun & Interesting

Marimo Notebooks - Query Polars DataFrames with SQL!

BugBytes 3,056 4 months ago
Video Not Working? Fix It Now

โ˜•๏ธ ๐—•๐˜‚๐˜† ๐—บ๐—ฒ ๐—ฎ ๐—ฐ๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ: To support the channel and encourage new videos, please consider buying me a coffee here: https://ko-fi.com/bugbytes Marimo Playlist: https://www.youtube.com/playlist?list=PL-2EBeDYMIbQkHyxk4PksdDo7mnt0u2z9 โญTop resource to learn Python - https://datacamp.pxf.io/kOjKkV โญ This video shows how to use SQL to query Polars DataFrames in Marimo Notebooks, using SQL Cells. We perform an analytical query using the LAG window function and a common-table expression to get insight into the data we read in. This video also dives into how to configure Marimo notebooks through the user interface, and from a .marimo.toml file. ๐Ÿ“Œ ๐—–๐—ต๐—ฎ๐—ฝ๐˜๐—ฒ๐—ฟ๐˜€: 00:00 Intro 00:43 Installing SQL dependencies - DuckDB and Pyarrow 02:21 Querying dataframes with SQL 05:32 Converting date column to Date data-type 07:30 Comparing values to previous row with SQL LAG window function 10:05 Getting months with largest increase in popularity using SQL Common Table Expression 12:50 Marimo SQL cells - under the hood 13:46 More SQL analytical queries 15:38 Plotting SQL query outputs 17:48 Marimo configuration ๐—ฆ๐—ผ๐—ฐ๐—ถ๐—ฎ๐—น ๐— ๐—ฒ๐—ฑ๐—ถ๐—ฎ: ๐Ÿ“– Blog: https://bugbytes.io/posts/ ๐Ÿ‘พ Github: https://github.com/bugbytes-io ๐Ÿ“š ๐—™๐˜‚๐—ฟ๐˜๐—ต๐—ฒ๐—ฟ ๐—ฟ๐—ฒ๐—ฎ๐—ฑ๐—ถ๐—ป๐—ด ๐—ฎ๐—ป๐—ฑ ๐—ถ๐—ป๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐˜๐—ถ๐—ผ๐—ป: Marimo: https://marimo.io/ Marimo configuration: https://docs.marimo.io/guides/configuration Marimo SQL: https://docs.marimo.io/guides/working_with_data/sql Polars: https://pola.rs/ DuckDB: https://www.youtube.com/watch?v=HJGiMTLcpDs Kaggle data: https://www.kaggle.com/datasets/muhammadkhalid/most-popular-programming-languages-since-2004 #python #datascience #dataanalytics #dataengineering

Comment