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
5 Respuestas
0
In line 7 you're missing a closing quotation mark.
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"])
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!
0
In the last line replace
"data"
with
r
And in the definition of df replace
["name"]
with
data["name"]
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.