Polars - An Introduction to Polars v1 for Python Data Analytics!
ฝัง
- เผยแพร่เมื่อ 25 ก.ค. 2024
- ☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
ko-fi.com/bugbytes
In this video we'll introduce the Polars package for data analytics in Python. This is a modern, rapidly growing alternative to Pandas for data analysis.
We'll look at the core data structures (Series, DataFrames) and will look at how to select rows/columns, add new columns, drop columns, aggregate and sort data, handle null values, plot data to charts, and how to read/write data from/to files.
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:26 Introduction to Polars
01:12 Installing Polars
02:14 Series objects in Polars
04:26 DataFrame objects in Polars
07:08 Selecting columns from DataFrames
08:53 Selecting rows with DataFrame filter method
11:05 Adding and Dropping columns from DataFrames
13:59 Sorting DataFrames
15:02 Grouping and Aggregation with DataFrames
19:17 Handling null values with Polars
24:00 Serialising data to files with Polars
25:33 Plotting DataFrame data with Polars
28:33 Polars and Pandas comparison
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: bugbytes.io/posts/
👾 Github: github.com/bugbytes-io/
🐦 Twitter: / bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Polars: docs.pola.rs/
Comparison with Pandas: docs.pola.rs/user-guide/migra...
#python #polars #datascience #data
Love this video. great intro!
Thanks a lot!
Thanks for the video. A polars/pandas/duckdb video would be lovely. Would also be nice if you could then showcase the lazy evaluation/query optimizer in polars compared to pandas. And if you're talking about duckdb which is SQL adjacent, maybe also some words about the SQL interface in polars.
Great suggestions, thank you - I'll look into some follow-up videos, including the polars/pandas/duckdb comparison.
Awesome 💯 will try it out soon
Thanks a lot, and good luck!
Thank you for introducing new library❤
@@Pradeep_prasad no problem thanks for watching!
Subscribed ! For amazing contents and consistency! Keep it up!♥
@@md.musfiqurrahaman8612 thanks a lot, much appreciated!
Perfect!
@@michaelmaguire6709 thanks!
polars is super nice to work with, did some data analysis in the last few months. Combined with marimo notebooks it felt like super powers 😅
@@knolljo I’ll need to check out marimo notebooks!
@@bugbytes3923 Definitely worth it! The ability to have reactive and easy to use interactive elements makes it amazing to work with, plus the notebooks are saved as .py files and can even be exported as standalone scripts, I love that as a git user.
I have been using pandas for years and was waiting to switch to polars which I started to do this year. Lots of pandas scripts to migrate!! I do enjoy Polars even small things like showing strings in “” helps. But some methods seem more verbose than needed and there are some conversations that seem to have been changed unnecessarily. On Nulls very happy to move always from Pandas hellish null handling.
Thanks for your sharing. I've been a heavy R user for the last ten years. I think Polars is closer to dplyr than Pandas. Now I know a better way to migrate my previous code.
@@Mshiunwu thanks for the comment! Glad to hear that Polars is more similar to R - should be easier to pick up for anyone moving to Python!
Thanks ...🎉
@@serychristianrenaud thanks for watching!
Best polars tutorial so far 👍
@@suyashdahale4355 thanks a lot!
🎉🎉🎉
Thanks a lot!!
Been using Polars for about a year, and I can't see myself using pandas again. Way faster at basically everything, and even though the code can end up looking quite verbose the syntax comes much more naturally to me. Lacking a built-in plot method was the only snag, but it has that now.
And as you said, I'm sure there are some integrations with other libraries that might not work, but there's always the to_pandas method.
Exactly how I feel too! I'll probably not go back to Pandas much, unless required, although it's served me well for a long time.
@@bugbytes3923Indeed. Pandas is still very ingrained (understandably so) so it’ll probably take time for things to move generally. But I’m excited about the possibilities. I’ve even seen it demonstrated that, due to the streaming API allowing it to process larger-than-memory data, Polars is capable of replacing Spark on a single node for some workflows (not all, of course).
am at 15:00 enjoying it so far what a great tutorial thanks for it why does polars seem better then pandas
@@ahmedbadal3795 thanks a lot!
Thanks 🎉
(select, filter, with_columns, groupBy, …) seems like Spark 😅
True! Some similarities with PySpark!
Can't use htmx and jquery together for a dropdown in django? I added a htmx get request to a dropdown. But when I use jquery select2 plugin for the dropdown, htmx get not working
What is i64 means below age
@@patcher2944 int64 (integer)
Looks really cool too bad I'll never get a tech job
That's the spirit.
I know Polars.