Question: In python do the following: A. Create a dataframe with two rows (one for the best store max_store , and one for the worst store
In python do the following:

A. Create a dataframe with two rows (one for the best store max_store, and one for the worst store min_store). The columns are the weeks week of the orange juice dataset. The values in the dataframe are the sum of the sales (logmove) of all three brands. Assign the dataframe to the variable store_sales. Then create a plot of the sales with on the x-axis the weeks, and on the y-axis the sum of the sales (the sum of the logmove).
B. Prepare a dataframe with two columns (the column price and the column logmove), with records only related to max_store. Assign this dataframe to variable oj1. Also create a table with the price and logmove with only records for store min_store. Assign this dataframe to variable oj2.
\begin{tabular}{rrrrrrrrrrr} & store & brand & week & logmove & feat & price & AGE60 & EDUC & ETHNIC & INCOME \\ \hline 0 & 2 & tropicana & 40 & 9.018695 & 0 & 3.87 & 0.232865 & 0.248935 & 0.11428 & 10.553205 \\ 1 & 2 & tropicana & 46 & 8.723231 & 0 & 3.87 & 0.232865 & 0.248935 & 0.11428 & 10.553205 \\ 2 & 2 & tropicana & 47 & 8.253228 & 0 & 3.87 & 0.232865 & 0.248935 & 0.11428 & 10.553205 \\ 3 & 2 & tropicana & 48 & 8.987197 & 0 & 3.87 & 0.232865 & 0.248935 & 0.11428 & 10.553205 \\ 4 & 2 & tropicana & 50 & 9.093357 & 0 & 3.87 & 0.232865 & 0.248935 & 0.11428 & 10.553205 \\ & & & & & & & & & & \\ \hline 28942 & 137 & dominicks & 156 & 7.987524 & 0 & 2.00 & 0.209602 & 0.528362 & 0.11325 & 10.966490 \\ 28943 & 137 & dominicks & 157 & 8.502689 & 0 & 1.94 & 0.209602 & 0.528362 & 0.11325 & 10.966490 \\ 28944 & 137 & dominicks & 158 & 9.505991 & 0 & 1.59 & 0.209602 & 0.528362 & 0.11325 & 10.966490 \\ 28945 & 137 & dominicks & 159 & 10.927376 & 0 & 1.49 & 0.209602 & 0.528362 & 0.11325 & 10.966490 \\ 28946 & 137 & dominicks & 160 & 8.859363 & 0 & 1.75 & 0.209602 & 0.528362 & 0.11325 & 10.966490 \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
