Skip to content
Home » python » Page 3

python

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

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… 

How to deploy a scraping script and Selenium in Google Cloud Run

In this blog post, you’ll learn how you can run scraping jobs using Selenium from Google Cloud Run, a fully managed solution that eliminates the burden of configuring and managing a Kubernetes cluster. It simplifies your production pipeline and fully automates your scraping process. Take notice, I’m not an expert… 

Set environment variables in a Python venv (Windows)

  • by
  • 1 min read

This is a brief overview of the possibilities for setting environment variables in a virtual environment (venv). Set environment variables in Python code Environment variables can be set inside your Python script. All child processes will inherit the environment variables and their values. Set environment variables in activate.bat or activate.ps1… 

Using TA-Lib in Deepnote

Using TA-Lib in a Jupyter notebook isn’t straightforward, and using it in a hosted solution like Deepnote could use a tutorial too. In this blog post, we’ll set up the popular Python wrapper for TA-lib. A prerequisite for installing the TA-lib Python wrapper is that you have the TA-lib library…