Aggregations Over Multiple Columns in Polars
Aggregations such as sum and mean are frequently used in data science and analysis. There are cases where you might want to aggregate values over columns instead of rows.
Page 2 of 8 · See all posts
Aggregations such as sum and mean are frequently used in data science and analysis. There are cases where you might want to aggregate values over columns instead of rows.
One of the features in DuckDB is its integration with other data libraries such as pandas. DuckDB makes it seamless when we convert to and from other dataframes and table formats.
How do you work with Amazon S3 in Polars? Amazon S3 bucket is one of the most common object stores for data projects.
Checking and filling missing values is an important piece in data science and analytics projects. A popular dataframe library, pandas, provides a method like fillna(), for example.
One of the features in Polars is LazyFrame. Polars is fast as is, and LazyFrame gives you even more optimizations.
I recently encountered a situation where I wanted to consolidate or group rows per group value into a Python list.
Have you ever need to calculate the percent of total for your data? I bet you’ve encountered situations like that many times.
One of the most common patterns in data is the need for conditional logic or if-else statements. You may want to assign a specific value when a certain condition is met.
Polars being one of the best Python libraries to work with data, it’s still new and it lacks some functionalities you may find in pandas, for example.
Have you encountered situations where you’re applying so many transformation on a Polars dataframe that your code is hard to follow?
There are a few ways you can use SQL in Polars. One option is to use other libraries such as DuckDB and pandas. And another option is to actually run SQL without using other libraries.
There are so many useful functions in DAX, however, there are also some functions that are not too intuitive to understand.
Get new posts by email. Occasional notes — no spam.