filmov
tv
How to Sort a DataFrame and Series in pandas

Показать описание
In this video we go over how to sort a pandas DataFrame based on a single column or multiple columns. We also discuss how to sort a single column of a DataFrame (not the entire DataFrame) and a Series that is not associated with a DataFrame. We also discuss how to sort ascending and descending and how to handle missing data when sorting.
Have you ever sorted strings and upper case values were sorted ahead of lower case values. We discuss how to fix this solution!
Did you find this video helpful? Consider subscribing for weekly tips, tricks, and tutorials.
Data from FiveThirtyEight
Link to data
0:00 Intro
0:21 Data
0:58 Sort DF, single col
1:26 Ascending/Descending
1:46 na_position
2:21 Sort DF, multiple cols
3:12 Sort col
3:33 Independent Series
Have you ever sorted strings and upper case values were sorted ahead of lower case values. We discuss how to fix this solution!
Did you find this video helpful? Consider subscribing for weekly tips, tricks, and tutorials.
Data from FiveThirtyEight
Link to data
0:00 Intro
0:21 Data
0:58 Sort DF, single col
1:26 Ascending/Descending
1:46 na_position
2:21 Sort DF, multiple cols
3:12 Sort col
3:33 Independent Series