Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Daniel Speers
2,223 PointsPandas Optional Challenge #3 - Verified Email List
I have been stuck on this challenge for a while and can't make any more progress. Here is the challenge:
TODO: Narrow list to those that have email verified. '''python email_list = users[users.email_verified == True] ''' TODO: The only columns should be first, last and email
email_list = email_list.loc[ : , ['first_name', 'last_name', 'email_verified']]
TODO: Remove any rows missing last names
email_list.dropna(inplace = True)
TODO: Ensure that the first names are the proper case
email_list.loc[ email_list.first_name.str.islower() , 'first_name'] = email_list.first_name.str.title()
TODO: Return the new sorted DataFrame..last name then first name ascending
email_list.sort_values(by=['last_name','first_name'], ascending = [True,True])
email_list
Any help appreciated
1 Answer
Daniel Speers
2,223 PointsI realized I need inplace = True when sorting the values as I was only sorting a copy before that