Using Pandas I made a dataframe that looks like this:
reqs id_num Airport User_name
162635 755892.392861 CHB jerry
3470 597553.214986 CHB george
81702 591434.723581 CHB albert
80982 591081.755452 CHB francios
...
..
In a separate csv I have 2 columns that look like this in a file called user_age.csv
User_name Age
albert 30
jerry 22
george 15
francios 45
...
..
The result I would like is a dataframe that looks like this:
reqs id_num Airport User_name Age
162635 755892.392861 CHB jerry 22
3470 597553.214986 CHB george 15
81702 591434.723581 CHB albert 30
80982 591081.755452 CHB francios 45
...
..
I'm not sure how to ask ^ questions. I tried to google around and couldnt find what I was looking to do. I would like to use the User_Name column as the index so that Ages drop in next to the correct username.
I can make a DF from the csv:
Ages = pd.read_csv("User_ages.csv")
But I don't know how to merge with the existing df that contains the reqs id_num etc.