UGBA88 Lab AX assignment - Jupyter Notebook

.pdf

School

University of California, Berkeley *

*We aren’t endorsed by this school

Course

113

Subject

Management

Date

Feb 20, 2024

Type

pdf

Pages

5

Uploaded by MegaSeahorseMaster651

Report
1/19/24, 5:56 PM UGBA88 Lab AX assignment - Jupyter Notebook https://ugba88.haas.berkeley.edu/user/darrinfan/notebooks/my-work/UGBA88 Lab AX assignment.ipynb 1/5 Lab AX: Data Management 1 Setup In [1]: 2 Competing with Best Buy continued 2.1 Business Decision A retail electronics company that competes with Best Buy wants to determine how well Best Buy is run. It hopes to craft its own corporate strategy to exploit any Best Buy weakness it might discover. (A company's corporate strategy is its decision about where to apply its limited resources.) 2.2 Data Retrieve Best Buy data, show the number of observations and the first few observations. # Import some useful functions from numpy import * from numpy.random import * from datascience import * from statsmodels.formula.api import * # Define some useful functions def correlation (array_1, array_2): return corrcoef(array_1, array_2).item( 1 ) # Customize look of graphics import matplotlib.pyplot as plt plt.style.use( 'fivethirtyeight' ) % matplotlib inline # Force display of all values from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity = "all" # Handle some obnoxious warning messages import warnings warnings.filterwarnings( "ignore" )
1/19/24, 5:56 PM UGBA88 Lab AX assignment - Jupyter Notebook https://ugba88.haas.berkeley.edu/user/darrinfan/notebooks/my-work/UGBA88 Lab AX assignment.ipynb 2/5 In [2]: 2.3 Analysis Show the first year and last year that revenue was recorded. Show the time span (in years) over which revenue was recorded. Do not round to nearest integer. In [3]: Show the quarterly revenue amounts over the time span. Out[2]: 83 Out[2]: Year Quarter Revenue Cost of Goods Sold Gross Profit (million) 1995 1 1274.7 1079.65 195.05 1995 2 1437.91 1228.08 209.83 1995 3 1929.28 1672.05 257.23 1995 4 2575.56 2246.24 329.32 1996 1 1637.18 1387.49 249.69 1996 2 1778.64 1510.14 268.5 1996 3 2007.32 1741.69 265.64 1996 4 2347.54 2005.64 341.9 1997 1 1606.55 1341.57 264.98 1997 2 1793.2 1486.05 307.15 ... (73 rows omitted) Out[3]: 1995 Out[3]: 2015 Out[3]: 20.75 data = Table().read_table( 'best_buy.csv' ) data.num_rows data first_year = min (data.column( 'Year' )) last_year = max (data.column( 'Year' )) span = data.num_rows / 4 first_year last_year span
1/19/24, 5:56 PM UGBA88 Lab AX assignment - Jupyter Notebook https://ugba88.haas.berkeley.edu/user/darrinfan/notebooks/my-work/UGBA88 Lab AX assignment.ipynb 3/5 In [4]: Calculate the sum of Best Buy's revenue over the time span. In [5]: Show Best Buy's quarterly gross profit amounts over the time span. Out[4]: array([ 1274.7 , 1437.91, 1929.28, 2575.56, 1637.18, 1778.6 4, 2007.32, 2347.54, 1606.55, 1793.2 , 2106.36, 2852.1 , 1943.66, 2172.49, 2492.47, 3456.03, 2385.43, 2686.6 4, 3107.34, 4314.62, 2963.72, 3169.17, 3732.08, 5461.5 8, 3697. , 4164. , 4756. , 6980. , 4202. , 4624. , 5131. , 6989. , 4668. , 5399. , 6032. , 8449. , 5479. , 6081. , 6646. , 9227. , 6118. , 6702. , 7335. , 10693. , 6959. , 7603. , 8473. , 12899. , 7927. , 8750. , 9928. , 13418. , 8990. , 9801. , 11500. , 14724. , 10095. , 11022. , 12024. , 16553. , 10787. , 11339. , 11890. , 16256. , 10940. , 11347. , 11788. , 16630. , 10373. , 9339. , 9280. , 14921. , 8928. , 8734. , 8924. , 14025. , 8639. , 8459. , 9032. , 14209. , 8558. , 8528. , 8819. ]) Out[5]: 607014.57000000007 revenue = data.column( 'Revenue' ) revenue sum (revenue)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help