Python Pandas Tutorial: Data Analysis & Visualization With Pivot Table in Pandas#14

  Рет қаралды 17,637

Programming Is Fun

Programming Is Fun

Күн бұрын

Hi Guys, In this video I have talked about how you can create pivot tables with visualization in Python. Pivot table is an very essential concept for data analysis, data wrangling and data pre-processing purpose. With pivot table we can easily summarize our data really fast from any dataset.
Most people likely have experience with pivot tables in MS Excel. Python provides also a same flavor using Pandas. Really using pandas pivot table you can look at your data from a different alignment and pivot extensively used in analyzing or summarizing the data.
This video covers as follows in greater details:
Pandas Pivot Table introduction
Why use Pivot Tables?
Pandas Pivot Table function syntax and parameters.
How to pick specific column in Pivot Table?
How to use aggregate function in Pivot Table?
How to apply multiple aggregate function on a single column in Pivot Table?
How to handle null values in Pivot Table?
How to set the total in each row and column using margins parameter?
How to apply filter in Pivot Table?
How to sort the data in Pivot Table?
How to create pivot table on specific portion of the data?
Use query method and its benefit with Pivot Table?
Create "bar" chart using Pivot Table.
Create "line" chart using Pivot Table.
How to plot sales month wise (extract month name from date column) and visualize it?
*More!!!
Raw Data Set: github.com/Abh...
Last Tutorial: • Python Pandas Tutorial...
Always looking for your valuable suggestion on what kind of videos you want in future, leave me a comment with your suggestion. Keep watching!!!
Python Teaser: • A Beautiful Python Pro...
Python Pandas Tutorial: • Python Pandas Tutorial...
Python Playlist: • Python Tutorial for Be...
Python Data Structure Playlist: • Python Data Structure
Python OOPs Playlist: • Object Oriented Progra...
Python Excel Automation: • Excel Automation Using...

Пікірлер: 43
@vitorribeirosa
@vitorribeirosa 2 жыл бұрын
Thank you very much for sharing this content!!! Cheers :)
@dss1871
@dss1871 3 жыл бұрын
Amazing 👍👍
@mosama22
@mosama22 9 ай бұрын
Thank you thank you thank you 😊😊😊😊
@aleksandarpetrovic2632
@aleksandarpetrovic2632 2 жыл бұрын
Amazing tutorial
@franciscodiaz8857
@franciscodiaz8857 3 жыл бұрын
Thanks, excellent explanation
@TheNinesku
@TheNinesku Жыл бұрын
Спасибо, Абхишек! 🌞🌞🌞
@kukki619
@kukki619 Жыл бұрын
Thanks for very informative video
@zhuzhujin9481
@zhuzhujin9481 2 жыл бұрын
this video is amazing
@pramishprakash
@pramishprakash Жыл бұрын
Thanks alot sir
@ranjithraghunathan1267
@ranjithraghunathan1267 2 жыл бұрын
Super
@shivamgaur2246
@shivamgaur2246 2 жыл бұрын
How to show count of na data using panda pivot just like excel pivot
@automatewithamit
@automatewithamit 5 ай бұрын
Thanks for your Video ! Can you please let me know if we can put those collapse and expand functionality in actually generated pivot table in excel using python ??
@ProgrammingIsFunn
@ProgrammingIsFunn 5 ай бұрын
You can watch video if possible: Excel Pivot Table and Aggregations using OpenPxl and Pandas-Part-5 kzbin.info/www/bejne/eYq0oZufjpanec0 Or in order to achieve the same feature just like ms excel then we can use xlwings
@saurabhkunal3624
@saurabhkunal3624 Жыл бұрын
how to put month in correct order . I see its alphabetical order of months i need to show correct order of months
@MrFishingo
@MrFishingo 2 жыл бұрын
great video! one question... when I sort_values, my "ALL" row gets in the middle of the table as there are values greater and lower than the total (all).... how can I sort values but the code needs to understand that "ALL" is the total and should go in the bottom of the df. THANKS!!!!
@ProgrammingIsFunn
@ProgrammingIsFunn 2 жыл бұрын
Thanks Ricardo. See, by default ALL row will be at bottom of the DF. For your case, might your data in object/string format that why you are getting ALL row in mid or wrong place. Try to run your code on the same data which I have used in the video.
@akileshreddy2150
@akileshreddy2150 2 жыл бұрын
How can you add multiple filter? Like in the video we gave region as east and I want to give one more filter like date as 11/08/2016. Basically I wanted to know how do we give multiple filter?
@ProgrammingIsFunn
@ProgrammingIsFunn 2 жыл бұрын
Hi Akilesh, Thanks for your comment. We can add as many filter as you want on a single DataFrame. I am sharing a one video where you can learn many different ways to apply the filter on multiple columns with multiple conditions. kzbin.info/www/bejne/oGW3Z4KtntKZfLs In case do you have any question on it please post your comment.
@akileshreddy2150
@akileshreddy2150 2 жыл бұрын
@@ProgrammingIsFunn Thank you so much!!
@tawandamukarati4051
@tawandamukarati4051 Жыл бұрын
Thank you for the video. Is it possible to plot the same data using Plotly?
@ProgrammingIsFunn
@ProgrammingIsFunn Жыл бұрын
Yes we can, plotly is one of the power full package for interactive data visualisation. And sharing a video where I have used plotly throughly. kzbin.info/www/bejne/baqkqGSkhcalm68
@Al-Ahdal
@Al-Ahdal Жыл бұрын
How to format numbers i.e. values in the pivot table? and rounding options. How to sort months by month number in plotting graph, as in the video they aren't in the correct order? How to show the values in millions, thousands in pivot table?
@cheonglily3992
@cheonglily3992 Жыл бұрын
i like to know can we store the pivot table and the data into spreadsheet and keep.
@prathyusharobbi947
@prathyusharobbi947 2 жыл бұрын
Can we create a pivot table in excel itself without using pandas using python?
@ProgrammingIsFunn
@ProgrammingIsFunn 2 жыл бұрын
Yes we can using python library xlwings or win32.
@prathyusharobbi947
@prathyusharobbi947 2 жыл бұрын
@@ProgrammingIsFunn Is there any reference for the same?
@Al-Ahdal
@Al-Ahdal Жыл бұрын
Hi, how to format numbers i.e. values in the pivot table?
@praveenkumar-ub4ni
@praveenkumar-ub4ni Жыл бұрын
How do I do the show details (the option which gives details of that value in a new spreadsheet) in python?
@K-mk6pc
@K-mk6pc Жыл бұрын
Hi i am doing the same for the data frame having 26L rows and 115 variables. It is taking huge time to compute. Any ideas ?
@igorrettally9577
@igorrettally9577 2 жыл бұрын
Excellent video, very detailed and clear, I just have one question, how can I order the months in the chart in chronological order instead of alphabetical?
@ProgrammingIsFunn
@ProgrammingIsFunn 2 жыл бұрын
Using matplotlib we can plot the chart in month's order. But in pivot table by default index will be sort in ascending or alphabetical order.
@arpeshmistry6550
@arpeshmistry6550 Жыл бұрын
Hello bro !! Can we create the links in the pivot table in pandas while exporting the data to the excel sheet
@vimalchawla6740
@vimalchawla6740 Жыл бұрын
How can I get an index of all your Videos on Pandas, like 1, 2, 3, 4, etc.
@ProgrammingIsFunn
@ProgrammingIsFunn Жыл бұрын
Python Pandas - Data Science and Automation kzbin.info/aero/PLWuFHho1zKhUJpe9WfSyvrrQrzqDErbmv
@BlueSkyGoldSun
@BlueSkyGoldSun 2 жыл бұрын
What is the name of the dataset in kaggle ? Or is it created by you personally?
@shashi_kamal_chakraborty
@shashi_kamal_chakraborty 2 жыл бұрын
Hello Sir, I tried to use the data set, by the github link you have provided. But, I think there's something wrong with it. When I tried to read it, the raw link, I got this error... "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 42492: invalid start byte". Please, help me with your kind suggestions about how to get rid of this.
@Tommy7417
@Tommy7417 11 ай бұрын
Guys Guys Guys Guys Guys GuysGuys Guys, need more and more GuysGuysGuysGuysGuysGuysGuysGuysGuysGuysGuys
@ProgrammingIsFunn
@ProgrammingIsFunn 11 ай бұрын
Yes 🙌
@JssRider
@JssRider 2 жыл бұрын
Thank you for the video. New learner and new subscriber for you. In minute 3.20 -> kzbin.info/www/bejne/pZeonqCAebB4jpI How would you do to see "Consumer" in all rows and not only in the first one? Like excel "Repeat all labels" Thank you in advanced.
@ProgrammingIsFunn
@ProgrammingIsFunn 2 жыл бұрын
Hi, Thanks for your comment. You can reset the index of Pivot table, for you information Pivot Table is also just like a DataFrame. So you can reset the index for repeating the 'Consumer', follow the below line. pd.pivot_table(sample, index = ['Segment','State']).reset_index()
@JssRider
@JssRider 2 жыл бұрын
@@ProgrammingIsFunn Thank you for responding. I'm afraid I've failed to do it, this is my code for the pivot table in case you can help. Anyway it's no big deal, I can do it after exporting the file in excel. pivot=pd.pivot_table(df,index=["COMPTE","DEVISE D'ORIGINE"],columns= "TYPE EVENEMENT",values='FINAL MONTANT',aggfunc= ["sum"],margins=True,margins_name="Total") pivot.fillna(0,inplace=True) Thank you again, I'll keep watching your videos, I need to learn a lot haha.
Python Pandas Tutorial: Pandas Apply Function and Vectorization #15
13:37
Programming Is Fun
Рет қаралды 4 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 266 М.
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 178 МЛН
Introducing Python in Excel
19:01
Leila Gharani
Рет қаралды 1,5 МЛН
Pandas Pivot &  Pivot table Difference
10:05
Automate with Rakesh
Рет қаралды 1 М.
Pivot tables with Pandas
9:00
Python and Pandas with Reuven Lerner
Рет қаралды 38 М.
Master Pivot Tables in 10 Minutes (Using Real Examples)
11:33
Kenji Explains
Рет қаралды 424 М.
Learning Pandas for Data Analysis? Start Here.
22:50
Rob Mulla
Рет қаралды 92 М.
Grouping & Pivoting in Pandas
13:29
Algovibes
Рет қаралды 1,6 М.
4 Pandas Functions That I Wish I Knew Earlier
4:33
Coding Is Fun
Рет қаралды 24 М.
Automate Excel Pivot Table With Python
24:03
Jie Jenn
Рет қаралды 26 М.