There are basically 2 ways to do this. Some may think that df.select(‘Your Column’) alone would work but nope. It doesn’t return a series object, it returns a dataframe object instead. Source code: Github repo
Month: February 2023
Pandas vs Polars – Speed Comparison
Pandas and Polars Pandas is probably the most popular library for data manipulation and analysis. If you work in data, I’m sure you have heard about it or you may use it on a daily basis. Pandas is very useful and versatile in various data tasks, however, the main issue that’s being talked about is…
Polars with DuckDB – Using SQL in Polars
Polars and DuckDB We see that Polars and DuckDB seem to be the same kind of tools, where we can use them for data analytics, data science, and data engineering tasks, with great performance. I’m not going into which one is better than the other, but I’d like to show you a good way to…
Read CSV Files with Polars in Python
Read a CSV file Using read_csv() If you know some pandas syntax already, then this will look very familiar to you. Polars has the same syntax to read csv files. You can look at the Polars documentation for read_csv() on some of the parameters options. For example, in the code above, notice that the date…
Calculate Average Sales Per Customer with DAX in Power BI
Calculate Average Sales Per Customer in a DAX Measure In any business intelligence tool, there is a need to calculate the average of a metric per data grain like customer or user. To many Power BI users, it’s not as intuitive as creating a simple measure calculating the average of sales. In this blog post,…