Ekam, a Data Analyst with a multinational brand has designed the DataFrame df that contains the four quarter’s sales data of different stores as shown below:
|
Store |
Qtr1 |
Qtr2 |
Qtr3 |
Qtr4 |
0 |
Store1 |
300 |
240 |
450 |
230 |
1 |
Store2 |
350 |
340 |
403 |
210 |
2 |
Store3 |
250 |
180 |
145 |
160 |
Answer the following questions:
i. Predict the output of the following python statement:
a. print(df.size)
b. print(df[1:3])
ii. Delete the last row from the DataFrame.
iii. Write Python statement to add a new column Total_Sales which is the addition of all the 4 quarter sales.