-
Notifications
You must be signed in to change notification settings - Fork 23
Two questions about assignment 1 and module 3 #28
Description
Hi to all of you!
I have two questions for you:
a)does your last exercise in module 3 (solutions) work? It does not recognize final_data
b)since the deadline of the first assignment ha already expired, I would like to ask you something about point 3 of ex. 4.3.5. I did like that (for the examiners: in our assignment you will also find another version of this point). The code below actually works, but I found difficult to label the boxplots for each passenger class. The order of the boxplots is uncertain, and after thinking a bit of it I realized that it might be due to the set, which is unordered. How to label them in a better way?
fig, ax1 = plt.subplots()
for c in set(titanic['class']):
x = titanic.loc[titanic['class'] == c, 'fare']
bp = plt.boxplot(x)
ax1.set_xlabel(f'{c} class')
ax1.set_ylabel('fare')
# # show plot
plt.show()
Have a nice Sunday, Niccolò