Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

7. It is advisable to do favors for people whenever possible.

Answered: 1 week ago

Question

9. Power and politics can be destructive forces in organizations.

Answered: 1 week ago