Replacing multiple values in a pandas DataFrame column
Without going into detail, here’s something I truly hate in R: replacing multiple values. In Python’s pandas, it’s really easy. In this blog post I try several methods: list comprehension, apply(), replace() and map(). First, let’s create some dummy data. First, let’s try with list comprehension. The get() function tries…