Welcome to the Treehouse Community
Looking to learn something new?
sort_values creates new DataFrame
Craig says this:
You'll notice that sort_values call actually created a new DataFrame. If you want to permanently change the sort from the default (sorted by index), you can pass True as an argument to the inplace keyword parameter.
My question is this:
How can you tell?
I found this a curious statement too, as I read it, and so I ran this second line:
users.sort_values(by='balance', ascending=False).head() users.head() # my line
And sure enough, by default,
users was still sorted alphabetically by index, the first row with an index of