I have a dictionary with a value c for states
stateC = {
"Washington" : 3,
"New York" : 5,
"Houston": 11,
}
and a dataframe:
State b
Washington 09
New York 100
Houston 55
I would like to integrate that column based on key value of dictionary in column c
and also a column d
that has value in b/c
State b c d
Washington 09 3 3
New York 100 5 20
Houston 55 11 5
How to do that in pandas?