0

I neeed help with Python for Data science please

I'm trying to olve the Code Coach problem: Contact list, but I keep getting a error. https://code.sololearn.com/cIf5uRi887bF/?ref=app

19th Feb 2022, 12:11 PM
Stacey Prahl
Stacey Prahl - avatar
5 Respuestas
0
In line 7 you're missing a closing quotation mark.
19th Feb 2022, 12:51 PM
Simon Sauter
Simon Sauter - avatar
0
I fixed that, but still getting error. please help import pandas as pd data = { 'name': ['James', 'Billy', 'Bob', 'Amy', 'Tom'], 'number': ['1234', '5678', '2222', '1111', '0909'] } df=pd.DataFrame(data, index=["name"]) r=input() print(df.loc["data"])
24th Feb 2022, 5:52 AM
Stacey Prahl
Stacey Prahl - avatar
0
I had tried to do the code snippet with a link, but every time I get to the share part, after I do post, I can't find where Sololearn keeps them to post here!
24th Feb 2022, 5:55 AM
Stacey Prahl
Stacey Prahl - avatar
0
In the last line replace "data" with r And in the definition of df replace ["name"] with data["name"]
24th Feb 2022, 6:57 AM
Simon Sauter
Simon Sauter - avatar
0
You can link to your code bits either by copying and pasting the link or by clicking on the "+" symbol next to the text field, choosing "Insert Code", then "My Code Bits" in the drop down menu in the top left corner and then selecting the code you want to share.
24th Feb 2022, 7:03 AM
Simon Sauter
Simon Sauter - avatar