hupili / python-for-data-and-media-communication-gitbook

An open source book on Python tailed for communication students with zero background
117 stars 62 forks source link

Add sort_by more than 1 columns with different ascending/ descending #121

Closed hupili closed 5 years ago

hupili commented 5 years ago

This example is good.

screenshot 2018-12-01 at 12 33 11 am

Please add to week 7 the sort values part.

ChicoXYC commented 5 years ago

multiple sort_values already exist in the week 7. with the following usage:

df.sort_values(['likes','bookmark'],ascending=[False,False])
hupili commented 5 years ago

I restructured sectioning. The content is intact. Please proof-read and then close the issue.

ChicoXYC commented 5 years ago

multiple sorting https://github.com/hupili/python-for-data-and-media-communication-gitbook/blob/master/notes-week-09.md#sorting-dataframesort_values