While working with data in Pandas, we perform a vast array of operations on the data to get the data in the desired form, before, for example, creating diagrams or passing to the visualization phase. One of these operations could be that we want to remap the values of a specific column in the DataFrame. This can be done in several ways.

The following example will show that, given a Dataframe containing data about an event, we can remap the values of a specific column to a new value, using a dictionary.

The first step, for this example, is to create a sample dataframe with some dummy data: