LoslegenKostenlos loslegen

Concatenating rows with duplicated indexes

Pandas is proving quite useful for your data prep! One small problem - your colleague reloaded the data frames without setting GameKey as the index for either frame. Can you still concatenate the games_2016 and games_2017 data frames?

Diese Übung ist Teil des Kurses

Pandas Joins for Spreadsheet Users

Kurs anzeigen

Anleitung zur Übung

  • View the indexes of the reloaded data frames.
  • Rejoin the data frames using pd.concat().
  • View the new data frame.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# View indexes
print(games_2016.index.values)
print(____.index.values)

# Rejoin data frames
games = ____([____, ____], 
    ____=____)

# View new data frame
print(____)
Code bearbeiten und ausführen