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 inefficientExplain why is this code inefficient he code below works-it will compute

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!