Feb-18-2017, 04:06 PM
Hello Phyton Fans,
I just started a coursere training to learn more about phyton.
When I used the jupiter notebook provided by coursere the below code worked without error however
in my local anaconda environment the error says:
--------------
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: ....
app.launch_new_instance()
--------------
I just started a coursere training to learn more about phyton.
When I used the jupiter notebook provided by coursere the below code worked without error however
in my local anaconda environment the error says:
--------------
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: ....
app.launch_new_instance()
--------------
def answer_three(): atleastonegold = df[(df['Gold.1']+df['Gold']) >1] #df.where(df['Gold']+df['Gold.1']>1) atleastonegold['summerminuswinter']= atleastonegold['Gold']-atleastonegold['Gold.1'] #=ADD a new column return atleastonegold #atleastonegold['biggestdifference'].idxmax() answer_three()I am only trying to create a new column.