filmov
tv
Python - How To Sort By Multiple Columns In A Pandas Dataframe

Показать описание
In this video I am going to answer a question I have been getting a lot recently (over last few months) - how to sort by multiple columns in a pandas dataframe! I am going to show some extras also - data cleansing, dropping columns and more!
Being able to sort by one and even multiple rows in a few lines of python code is essential to being a good analyst or data scientist. I am going to show you how to sort regular campaign data from a pizza business and we are going to do it with both a single column sort and then a multiple column sort by date and customer number. This multiple column sort is what we typical see and use in data science requests for marketing. Yes, there is usually more then just a sort (regression, sales basket metrics, clustering, etc.), but it is essential to have this skill and to be able to do it quickly.
This video will show you how to:
1) load Pandas library
2) load the data from a CSV file properly
3) list all the column names properly
4) cleanse the data by removing the last 2 columns of unnecessary data
5) how to sort by 1 column (customer number)
6) how to sort by 2 columns (Date and Customer Number)
The skills we teach in this video and the many others on our channel, Tech Know How, are essential is you want to become a great analyst or data scientist or even if you already are one and want to up your game and improve your skills.
Thanks again for watching.
Please take a moment to subscribe, like and share and have a great day!
Don't forget to check out all the other great videos available in python, R, Power BI, Excel, analytics, data science and more on Tech Know How.
Thanks again and God Bless!
Being able to sort by one and even multiple rows in a few lines of python code is essential to being a good analyst or data scientist. I am going to show you how to sort regular campaign data from a pizza business and we are going to do it with both a single column sort and then a multiple column sort by date and customer number. This multiple column sort is what we typical see and use in data science requests for marketing. Yes, there is usually more then just a sort (regression, sales basket metrics, clustering, etc.), but it is essential to have this skill and to be able to do it quickly.
This video will show you how to:
1) load Pandas library
2) load the data from a CSV file properly
3) list all the column names properly
4) cleanse the data by removing the last 2 columns of unnecessary data
5) how to sort by 1 column (customer number)
6) how to sort by 2 columns (Date and Customer Number)
The skills we teach in this video and the many others on our channel, Tech Know How, are essential is you want to become a great analyst or data scientist or even if you already are one and want to up your game and improve your skills.
Thanks again for watching.
Please take a moment to subscribe, like and share and have a great day!
Don't forget to check out all the other great videos available in python, R, Power BI, Excel, analytics, data science and more on Tech Know How.
Thanks again and God Bless!
Комментарии