Solve Pandas read_csv: UnicodeDecodeError: ‘utf-8’ codec can’t decode byte […] in position […] invalid continuation byte

  • by
  • 2 min read

Reading CSVs is always a little bit living on the edge, especially when multiple regions are involved in producing them. In this blog post, we’re solving UnicodeDecodeError: ‘utf-8’ codec can’t decode byte […] in position […]: invalid continuation byte. Important, I’m assuming you got the error when you used Pandas’… 

Subsetting a Pandas DataFrame using multiple conditions, Part 1: Bitwise operators

  • by
  • 2 min read

This blog post is the first post in a two-part series on subsetting Pandas DataFrame rows using chained conditions. In this post, we tackle the following ValueError. Part 1: Bitwise operators Part 2: Parentheses Filtering (or subsetting) a DataFrame can easily be done using the loc property, which can access… 

Subsetting a Pandas DataFrame on multiple conditions, Part 2: Parentheses

  • by
  • 2 min read

This blog post is the second post in a two-part series on subsetting Pandas DataFrame rows using chained conditions. In this post, we tackle the following TypeError. Part 1: Bitwise operators Part 2: Parentheses Filtering (or subsetting) a DataFrame can easily be done using the loc property, which can access… 

Using ‘PARTITION BY’ in BigQuery to calculate the share per group

  • by
  • 3 min read

In this blog post we’ll calculate the share of a row per group. There are multiple ways to do this: with aggregate functions and with analytic functions. We’ll go over both and demonstrate how analytic functions are far superior in terms of readability. First, let’s create a table to demonstrate… 

A primer on iOS 14.5’s impact on Facebook audience building (and what to do about it)

  • by
  • 6 min read

I’ve read a lot of bullshit regarding the impact of Apple’s notorious iOS14.5 update. It’s a fairly technical & complex matter, yet most articles on the subject are clickbait or just content for the sake of being content, often written by a junior content marketer. Consequently, I couldn’t resist finding…