Removing elements

Report a typo

Imagine you have a Series called olympics that stores the names of the cities hosting the Summer Olympics between 2000 and 2020. The index is set to the year of the games (as an integer), and the city names are represented as strings. Here is a fragment of the Series:

2000            Sydney
2004            Athens
...
2020             Tokyo
dtype: object

However, the games of 2020 were cancelled because of the COVID-19 outbreak.

Define a function that removes the corresponding row from the olympics and returns the resulting Series object.

Write a program in Python 3
import pandas as pd

def drop_record(olympics):
pass
___

Create a free account to access the full topic