If you’re following along with this lesson and not using the provided Jupyter Notebook from this course’s supporting materials, you can copy-paste the following data
dictionary:
data = {
'name': ['Xavier', 'Ann', 'Jana', 'Yi', 'Robin', 'Amal', 'Nori'],
'city': ['Mexico City', 'Toronto', 'Prague', 'Shanghai',
'Manchester', 'Cairo', 'Osaka'],
'age': [41, 28, 33, 34, 38, 31, 37],
'py-score': [88.0, 79.0, 81.0, 80.0, 68.0, 61.0, 84.0]
}
For more information about pandas DataFrames, take a look at Intro to data structures: DataFrame in the pandas documentation.
ymlin on Aug. 16, 2021
Great introduction. It looks like a comma is missing at the end of ‘city’ in the Description (it’s correct in the video), corrected as below: