Question: Explain why is this code inefficient he code below works-it will compute the total of the column -but it is inefficient. 1. Insert a markdown
Explain why is this code inefficient
he code below works-it will compute the total of the column -but it is inefficient. 1. Insert a markdown cell below and, in a sentence or two, describe why the code is not efficient. df=pd. DataFrame ({x:[100,200,300],y:[1,2,3]}) ytot =0 for i in range (0,3): y ytot = ytot +df.iloc[i,1]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
