Exercise

Renaming categories

The likes_children column of the adoptable dogs dataset needs an update. Here are the current frequency counts:

Maybe?    1718
yes       1172
no          47

Two things that stick out are the differences in capitalization and the ? found in the Maybe? category. The data should be cleaner than this and you are being asked to make a few changes.

Instructions

100 XP
  • Create a dictionary called my_changes that will update the Maybe? category to Maybe.
  • Rename the categories in likes_children using the my_changes dictionary.
  • Update the categories one more time so that all categories are uppercase using the .upper() method.
  • Print out the categories of the updated likes_children Series.