import pandas as pd
# Let's create a pandas dataframe
df=pd.DataFrame({
"Name": ['Joyce','Joy','Ram','Maria'],
"Age": ['19','18','20','19'],
"Hobbies": ['Yoga','Dance','Sports','Reading']
"Favorite Food": ['Pizza', 'Pasta', 'Dosa', 'Idly']},
columns=['Name','Age','Hobbies','Favorite Food'])
print(df)
File "./remove_columns_pandas.py", line 8
"Favorite Food": ['Pizza', 'Pasta', 'Dosa', 'Idly']},
^
SyntaxError: invalid syntax
SyntaxError当我运行代码时我得到了这个,但我不知道为什么。非常感谢您对我收到此错误的原因的意见。
MMTTMM
相关分类