I had searched Google and youtube for an entire day to gain some clarity in this concept. Finally got the right video. Thanks!
@datagy3 жыл бұрын
I’m so glad it was helpful!
@idlejam863 жыл бұрын
same
@datagy3 жыл бұрын
Thank you so much!
@SunGlassesBlue2 жыл бұрын
Thank you dude, you saved my life ! Subscribing is not an option =)
@datagy2 жыл бұрын
Glad it helped!
@AnalyticInsight2 жыл бұрын
Thanks for your clear and complete treatment of pivot table. Easy to comprehend, started to use immediately.
@datagy2 жыл бұрын
Thanks so much for your comment! I appreciate the feedback :)
@SetoAjiNugroho4 жыл бұрын
I skipped every basics of machine learning and now i realized that i need basic like this. Thanks to made it easy to learn. Very great explained :D
@datagy4 жыл бұрын
I’m so glad it was helpful! :)
@SoulSheIS3 жыл бұрын
Thank you for keeping your videos short, yet informative and engaging.
@datagy3 жыл бұрын
I’m glad you liked it!
@SoulSheIS3 жыл бұрын
@@datagy Absolutely! May I ask how would you know when to use the pivot method as oppose to the pivot_table method?
@datagy3 жыл бұрын
@@SoulSheIS the pivot_table method is a bit more flexible. Essentially, if you have duplicates in your data, the pivot_table method is necessary. Similarly, it allows you to use multiple indices. Historically, the pivot_table method is built on pivot, but was introduced to not break previous functionality. Hope this helps!
@SoulSheIS3 жыл бұрын
@@datagy Ah, okay, makes a lot of sense. Thank you for clarifying!
@datagy3 жыл бұрын
@@SoulSheIS Glad it helped!
@OberynPinkViper3 жыл бұрын
Just wanted to say thank you for the incredibly simple yet comprehensive video. I stumbled upon the pivot() method while working through data visualisation, and I wasn't 100% sure how it worked. After this watching this video, everything is much more clearer and understandable to me.
@datagy3 жыл бұрын
Thank you so much for your kind words! That means a lot!
@amahimahiaha3 жыл бұрын
I normally get my info on youtube videos and go. This video quickly/easily helped me solve something I'd been struggling with! I had a groupby that I couldn't figure out how to transpose. PIVOT is what I wanted! Thanks!
@datagy3 жыл бұрын
I’m glad it helped! :)
@gauthamambethkar44833 жыл бұрын
The way you explained was perfect. Keep up the good work. Hoping to see a lot more data science and Machine Learning videos from you
@datagy3 жыл бұрын
Thanks so much, Gautham! I have lots more planned :)
@TotallyAqua3 жыл бұрын
Really helpful video. I liked how you explained adding totals to the rows and columns.
@datagy3 жыл бұрын
Thanks so much!
@cocoapebbles103 жыл бұрын
This is awesome dude! You really saved my bacon here. It's so difficult to learn this stuff over Zoom class.
@datagy3 жыл бұрын
I'm so glad it was helpful!
@Danielmelian32 жыл бұрын
I was looking for this everywhere, Thankyou so much!
@datagy2 жыл бұрын
Thanks so much, Daniel!
@rajeeb1012 жыл бұрын
Fantastic work! Simple and to the point. Thank you.
@datagy2 жыл бұрын
Thank you so much!
@Dimejesi2 жыл бұрын
Thank you so much. I just started learning python for data Science and you really broke this down and made it easy for me to understand
@datagy2 жыл бұрын
Thank you!! That means a lot to me!
@jamesgilmore55382 жыл бұрын
This was the most helpful video I've seen on anything pandas. Thank you. Appreciate the simple and short examples/steps that explain the arguments.
@datagy2 жыл бұрын
Thanks so much, James! That means a lot to me!
@rferstahl2 жыл бұрын
simple and to the point, exactly what I was looking for. Thanks
@datagy2 жыл бұрын
I’m so glad!
@vicka_zhurina3 жыл бұрын
Nik, thank you for such a clear explanation of the syntax and all the features! It’s not the first of your videos that I have seen, and each time I am amazed how simply Python might be clarified. Good luck and a lot of inspiration for your new videos!
@datagy3 жыл бұрын
Thank you so much for your kind words! I’ll have more videos coming soon! :)
@MayankSinghParmar2 жыл бұрын
Simple and Clear. Very good video
@datagy2 жыл бұрын
Thank you so much!
@rohitbhosale36172 жыл бұрын
Thank you so much!To the point. Love from India
@toddbrannon62623 жыл бұрын
Thanks for this video. So straight to the point. I learned something I can now put to use!
@datagy3 жыл бұрын
Thanks so much, Todd!
@JDUDEadventure Жыл бұрын
Thank you video was super helpful to better understand pivot tables with pandas
@irvingescobar39774 жыл бұрын
This is exactly the video I needed! Been looking to transition out of excel pivots due to huge data sets and this was super helpful.
@datagy4 жыл бұрын
I’m so glad it was helpful, Irving!
@irvingescobar39774 жыл бұрын
@@datagy Hoping you do some more deep dives into data analysis soon :D
@datagy4 жыл бұрын
Thanks!! I’ve got a lot of exciting stuff coming!
@gvvlogsriderunrefresh61553 жыл бұрын
One of the best videos i have ever seen. So simplified and So effective
@datagy3 жыл бұрын
Thank you, Gaurav!
@gvvlogsriderunrefresh61553 жыл бұрын
@@datagy Hey Nik , Can you also put in some videos on Seaborn usage for Visualization and on Statistics in Python. It will be a great favour brother
@datagy3 жыл бұрын
Hey Gaurav! Seaborn is definitely planned (as well as plotly). What kind of statistics in python are you looking for? :) thanks for the ideas!
@gvvlogsriderunrefresh61553 жыл бұрын
Dear Nik, In statistics if you can cover working with scipy.stats , cover some tests in python etc . Thanks a lot again for your prompt response
@datagy3 жыл бұрын
@@gvvlogsriderunrefresh6155 Thanks! I'll add this to the list!
@DrSpacemann4 жыл бұрын
Killed it again! Very clear and easy to follow,thank you!
@datagy4 жыл бұрын
Thanks so much! 😊
@bevg12 жыл бұрын
wow! you are a good teacher... straight to the point and it is not boring. 👍
@datagy2 жыл бұрын
Thank you so much!
@luqmanhakim77814 жыл бұрын
Crystal clear explanation ! Thanks for sharing.. looking forward for more content like this :)
@datagy4 жыл бұрын
Thank you so much Luqman! I’ll be releasing more videos soon! :)
@luqmanhakim77814 жыл бұрын
@@datagy keep it up the good work man 👍
@mrescience25543 жыл бұрын
Oh my goodness, this is exactly what I needed! Great explanation, thank you so much.
@datagy3 жыл бұрын
Thank you so much! I’m glad it was helpful!
@mapa50003 жыл бұрын
Very well explained !!! . thank you !
@datagy3 жыл бұрын
Thanks so much, Marco!
@syhusada11302 жыл бұрын
how would you pivot multiple columns?
@datagy2 жыл бұрын
If you’re looking to aggregate multiple columns, you could place them as a list into the values parameter :)
@alfonsoborges48852 жыл бұрын
Thanks, great explanation !
@datagy2 жыл бұрын
Thanks for your comment!
@acesovernines Жыл бұрын
Succinct and super effective. Thank you so much
@datagy Жыл бұрын
Thanks so much!
@d00lph1n3 жыл бұрын
Thank you. Great explanation :)
@ravirajshelar2504 жыл бұрын
Thanks you just made me learn it so easily.😊
@datagy4 жыл бұрын
Thanks so much! I'm glad it was helpful!
@krishnaRaog214 жыл бұрын
Very nice ...You made things so simple
@datagy4 жыл бұрын
Thanks! I’m glad you liked it!
@SayanChakraborty103973 жыл бұрын
This was great! Thanks a lot :)
@datagy3 жыл бұрын
Thank you, Sayan!
@jongcheulkim72842 жыл бұрын
Thank you very much. This is very helpful.
@azrflourish90323 жыл бұрын
clear explanation! thank you
@datagy3 жыл бұрын
Thank you!
@דןשטיבלמן2 жыл бұрын
tnx alot. how can we claculate the precentage by the total (for each column....) ?
@TrungNguyen-te1wm3 жыл бұрын
Great tutorial. Thanks
@datagy3 жыл бұрын
Thanks Trung!
@chinmaychourdia69292 жыл бұрын
3:56 , What if we want only the region which has maximum sales
@nicozing45523 жыл бұрын
Thank you so much! very clear :)
@datagy3 жыл бұрын
Thanks Nico!
@DIGITAL_COOKING2 жыл бұрын
please i have one question if you want the mean values to be integers how you can do that, thanks!
@datagy2 жыл бұрын
You can convert the column to integers by apply the .astype('int') method on the column of the resulting dataframe :). Such as: pivot['col'] = pivot['col'].astype('int')
@DIGITAL_COOKING2 жыл бұрын
@@datagy thanks a lot for your help
@timfairfield4072 жыл бұрын
great explanation. thanks
@datagy2 жыл бұрын
Thanks Tim!
@ravindrareddy5478 Жыл бұрын
is there any way to merge empty cells using python in a pivot table
@mariaromero3488 Жыл бұрын
so helpful, thanks!
@datagy Жыл бұрын
Thanks so much!
@AnjanBasumatary2 жыл бұрын
How to display emty rows and column combination? ....in the output I only get those rows and column which have values
@datagy2 жыл бұрын
You can use dropna =False in the pivot_table function :)
@AnjanBasumatary2 жыл бұрын
@@datagy Table3TEST3= PL.pivot_table(values =( 'ID','IN'),index = 'SEGMENT', columns='CUTOFF',dropna= False, aggfunc = {'ID':'count','IN':sum}) I have used dropna=False but still not working files uploaded in this link: drive.google.com/drive/folders/1Pnc4YMjqL0loclfX-5Nxi3KTpxFd1ffm?usp=sharing
@elfridhasman41812 жыл бұрын
Wow, thank you very much 🙏🙏😍
@datagy2 жыл бұрын
Thanks for your comment, Elfrid!
@alcapone67963 жыл бұрын
How do I use the pivot table values to create a histogram?
@datagy3 жыл бұрын
You may not need to pivot anything to create the histogram, as the histogram will create bins for you automatically. I’d suggest checking out my video on histograms: kzbin.info/www/bejne/o2HcZqinipJgj7M
@parthraval60523 жыл бұрын
hey nice video..one problem - suppose i have values in a column starting with 5555 eg(55551,55553,55557 etc)....how to filter it out
@datagy3 жыл бұрын
Hi Parth, Thanks for your comment! I'd say, and there's probably much better ways to do this, but one way you could do this is to filter a string version of the column: df = df[df['colname'].astype('str').str.contains('5555')]
@parthraval60523 жыл бұрын
@@datagy thanks for your reply I will try it out 👍
@deep.jain. Жыл бұрын
How to add filter to these pivot tables?
@datagy Жыл бұрын
You’d filter the dataframe either beforehand or when you pass it into the data argument :)
@86Maryj2 жыл бұрын
Hi can you pls to pivot with multiple sheets
@XuanTran-ri1hn3 жыл бұрын
Thank you very much for your video. May I ask if you can explain the value in the pivot 5? Is it average value or sum? I just need a confirmation :)
@datagy3 жыл бұрын
Hi Xuan, thanks for your comment! By default, a Pandas pivot table will calculate the average value :).
@XuanTran-ri1hn3 жыл бұрын
@@datagy Thanks :)
@ahmedhelal9203 жыл бұрын
thanks for this useful information , i am trying to add pivot on function and add this function using xlwings on excel , the function works good , but i need it come with porders GUI instead off normal cells
@datagy3 жыл бұрын
Hi Ahmed, thanks for your comment! Could you explain what you mean by porders?
@syedrizvi26873 жыл бұрын
Thank you so much!
@datagy3 жыл бұрын
Thanks so much for your comment!
@yellowsun72413 жыл бұрын
Thanks for this. How can I make jupyter print these nice looking tables like in the video ? Mine are very plain and all over the place. Cheers!
@datagy3 жыл бұрын
Thanks for your comment! It should work if you simply write the object name without calling print(). Hope this helps! :)
@yellowsun72413 жыл бұрын
@@datagy thanks Nick! ;)
@tuandino69902 жыл бұрын
well explained!
@datagy2 жыл бұрын
Thank you!!
@debjanidas67792 жыл бұрын
Can you just tell me what and why you made changes between 7:39 sec to 7:42 sec. Than you great video
@tobecontinued...57124 жыл бұрын
What if the value i want its sum is a string?? what can i do to get the sum of a string value?
@datagy4 жыл бұрын
Hi there! Is the "string" a number? i.e., "9" formatted as a string?
@tobecontinued...57124 жыл бұрын
@@datagy no ,the value is " lancé, terminé, provisoire ", and i have different section, and I want the sum of the values of each section.
@datagy4 жыл бұрын
@@tobecontinued...5712 Ah, you want the values broken out by those categories? So each section lance, termine, provisoire (forgive my lack of accents) would have numeric values beside it?
@MrFishingo3 жыл бұрын
hello datagy!! two questions, how can I calculate a weighted average on the pivot table?? Second, after results are printed, how can I sort values within a column? thanks for the great videos!!
@datagy3 жыл бұрын
Hi Ricardo! Thanks so much for your comment! To sort your data, you'd technically want to sort it before printing it (or in the print function). You can sort data. Such as print(df.sort_values(by=['colname'])). I have a video on this topic here: kzbin.info/www/bejne/amK7fYeHfpaksKs To create a weighted average you can follow along with my written tutorial here: datagy.io/pandas-weighted-average/ It'll walk you through a number of different ways in which you can calculate a weighted average (including using Pandas).
@amrimanel38553 жыл бұрын
thank you very much for your explanation ; handsome man. do you have a document that contains all the equation please ? the links : all of them error
@datagy3 жыл бұрын
Thanks Amri! I'm glad it was helpful! I'm not able to find any formal documentation on this, but you can pass in many different kinds of functions, including numpy's functions.
@gouthamkarakavalasa42674 жыл бұрын
Hi can you pls let me know how to create pivot tables with mode as function, no mean. I looking a way to analyse data by pivoting on object data type with mode function. Kindly do the needful.
@datagy4 жыл бұрын
Hi there! Thanks so much for your great question! Import mode from scipy.stats using: from scipy.stats import mode Then, in your pivot table, as the aggfunc= use the following: aggfunc=lambda x: x.mode().iat[0] Just tested it and it works well :)
@gouthamkarakavalasa42674 жыл бұрын
@@datagy Hey, Thank u very much.. it worked:)
@datagy4 жыл бұрын
I’m so glad! Thanks for letting me know :)
@Diamond_Hanz3 жыл бұрын
NYC here...Data Science Major.
@datagy3 жыл бұрын
Welcome to the channel!
@boppanibhanuprasad46123 жыл бұрын
Plain and simple.
@datagy3 жыл бұрын
Thank you!
@MagnusAnand3 жыл бұрын
Cool video
@datagy3 жыл бұрын
Thanks Guz!
@milkway7312 жыл бұрын
i just found if I set margin, the code will fail. Traceback (most recent call last)