Consider the following pandas.DataFrame:
>>> import pandas as pd
>>> df = pd.DataFrame({
... "sym": ["a", "b", "c"],
... "del": [1, 2, 3]
... })
And consider the following dict:
>>> d = [{"sid": 99, "sym": "b"}, {"sid": 88, "sym": "c"}]
I need to update df's index with the value of sid where sym matches. For this example, my output would like like this:
>>> df
sym del
0 a 1
99 b 2
88 c 3
How might I do this?