Question
1) a) Create a quarterly turnover report for two companies: Apple and Google in 2019. For each company, randomly generate a value between 3 and
1)
a) Create a quarterly turnover report for two companies: Apple and Google in 2019. For each company, randomly generate a value between 3 and 4 (unit: ten billion) as turnover for each of the four quarters.
Make one line plot figure: show two lines in one figure, x-axis shows dates, y-axis shows turnover, data points of the two companies should be marked in different colors and markers. Refer to Unit 2 page 20 lecture notes.
Hint: numpy.random.uniform(), pandas.date_range()
b) Load Iris data using the file Iris.csv. The data set consists of 50 samples from each of three species of Iris (Iris setosa, Iris virginica and Iris versicolor). Four features were measured from each sample: the length and the width of the sepals and petals, in centimeters. 1) Make histograms for four features and three species. Plot the 12 (4x3) subfigures in one figure with titles for each subfigure. Observe the distribution.
2) Make box plots for three samples/species of one specific features. Plot 4 subfigures (4 features correspondingly, 4x1) in one figure with titles and axis labels.
please upload screenshots of code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started