Exercise

Summarizing user types

Since you can use the count() wrapper, why bother counting rows in a group as part of a grouped summary? Sometimes you want a more detailed summary, and knowing how to compute a count as part of a grouped summary that mixes numeric and categorical summaries can come in handy.

Instructions

100 XP
  • Group twitter_data by whether or not a user is verified.
  • Compute the average number of followers for each type of user. Call this new column avg_followers.
  • Count the number of verified and non-verified users. For consistency, call this new column n.