0

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

  1. Create a new column in dataframe 2
  2. Plug in the values in dataframe 1 in the rows for which the names match dataframe 1.
  3. 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?

Stan Shunpike
  • 1,916
  • 3
  • 17
  • 30

0 Answers0