0

I need help with passing the locating contacts exercise on python for data analysis using pandas, and I've been stuck.

Hi, I've been trying to complete the locating contacts exercise for Python for data analysis using pandas, and I've been unable to. This is the code I ran, and it gives an attribute error. I've tried every possible means to correct this all to no avail. import pandas as pd data = { 'name': ['James', 'Billy', 'Bob', 'Amy', 'Tom'], 'number': ['1234', '5678', '2222', '1111', '0909'] } df = pd.Dataframe (data, index = ['James', 'Billy', 'Bob', 'Amy', 'Tom']) name = input() print (df.loc[name])

8th Feb 2023, 1:03 PM
Akerele Desmond
Akerele Desmond - avatar
1 Odpowiedź
+ 3
Akerele Desmond it's pd.DataFrame not pd.Dataframe
8th Feb 2023, 1:53 PM
Bob_Li
Bob_Li - avatar