Computer scienceData scienceInstrumentsPandasStoring data with pandas

Combining Data in Pandas

Absent values

Report a typo

You have two DataFrames:

  • authors keeps authors' names and their books;
  • ratings — authors' names and average ratings of each book on several websites.

The names in the datasets overlap but they are not in a one-to-one correspondence. Suppose you merged authors and ratings. Now, your output includes authors only if they can be found in ratings; moreover, they have NaN in columns corresponding to the columns from authors, if their names are not in this DataFrame. Which operation would give us with such a result?

Select one option from the list
___

Create a free account to access the full topic