I have two data frames.
Dataframe 1
NAME TWEET COUNT
Jill 304
Sara 243
Bill 3022
Dataframe 2
NAME SEX STATE
Bill Male IL
Jane Female MI
Steve Male CA
Sara Female IN
Jill Female AL
I want to
- Create a new column in dataframe 2
- Plug in the values in dataframe 1 in the rows for which the names match dataframe 1.
- Fill in the empty spaces in the column with NA
I don't understand how to do the matching part. How do I compare two dataframe columns with unequal lists?