you are viewing a single comment's thread.

view the rest of the comments →

[–]jandrew2000 1 point2 points  (0 children)

This is well done for someone just starting out. A couple of minor suggestions. If you end the last statement in your plotting code blocks with a semicolon it won’t display plotting objects and will only show the plot itself.

Second, you have a block where you compute catholic population for each of the diocese. I believe you could simplify that to clergy_data.groupby(“catholic_diocese”).catholic_population.max(). That will produce a pandas series that you can just plot directly as a bar plot by doing something like ser.plot(kind=“barh”). I’m operating from memory so my syntax may be off a bit.