Home /
Expert Answers /
Computer Science /
please-help-with-this-python-problem-6-professor-derek-is-worried-about-outcomes-over-time-for-his-pa192
(Solved): please help with this python
Problem 6) Professor Derek is worried about outcomes over time for his ...
please help with this python
Problem 6) Professor Derek is worried about outcomes over time for his age bracket (30-40). He wants you to plot the relative frequency of Spearman's correlation here. Fill in the function below. [1] \# Problem 6) Complete where we have indicated below def create_bar_plot_for_derek(covid19_data): \# first we subset the data by the appropriate age bracket and do a bit of cleaning prof_age_data \( = \) covid19_data[covid19_data.age_range \( == \) "30-40"] prof_age_data=prof_age_data.replace(to_replace \( ={ }^{\prime} 25.02 .2020-26.02 .2020{ }^{\prime} \), value \( ={ }^{\prime} 25.02 .2020{ }^{\prime} \) ) \# and we convert the column to a date-time prof_age_data['date_confirmation']=pd.to_datetime(prof_age_data['date_confirmation'], dayfirst=True) outcomes_over_time \( =\# \) Problem 6) fill in here outcomes_over_time = outcomes_over_time.dropna() \# we should drop the rows with missing values \( x=\# \) Problem 6) fill in here \( y=\# \) Problem 6) fill in here error \( = \) \# Problem 6) fill in here fig, \( a x= \) plt. subplots(figsize \( =(20,10) \) ) ax. errorbar \( \left(x, y\right. \), yerr=error, \( \left.f m t={ }^{\prime}-0^{\prime}\right) \) plt.ylabel('Relative Frequency', fontsize=14) plt. xlabel ('Date', fontsize=14) return \( x, y \), error