Map values from a dataframe

Viewed 482

I have a dataframe with the correspondence between two values:

enter image description here

A another list with only one of the variables:

l = ['a','b','c'] 

I want to make the mapping like:

df[l[0]] 

and get 1

df[l[1]] 

and get 2

As if it was a dictionary, how can I do that?

2 Answers
Related