How To Use Assign Method In Pandas DataFrame

preview_player
Показать описание
In this session of @analyticsschool , we will discuss how to use assign methods in pandas dataframe effectively and learn how to create multiple new columns using assign method. We'll explain the assign method's functions and operation, as well as provide step-by-step usage samples.

The assign method is efficient and versatile during a sequence of multiple operations when used with method chaining. Moreover, it always returns a copy of the data, leaving the original dataframe unchanged.

Chapters:

00:00 - Introduction
00:48 - Reading Superstore Dataset
02:16 - Create Multiple Columns Using Assign Method
10:14 - Summary

#analyticsschool #dataanalysis #dataanalyst #datascience #datascientist #pandastutorial #pandas #pythonprogramming #pythontutorial
Рекомендации по теме
Комментарии
Автор

Wow, I'm amazed. Explained so well. Thanks for the video

quadirnawaz
Автор

Really good presentation very helpful :)

robertc
Автор

Am learning a lot from you sir ...
Thank you...

vamsikrishna
Автор

Not able to implement a use case where I need to create a column with ternery operator using assign. It works with apply but not assign. Can you show if ternery operation is possible with assign?

pmgvalentia
Автор

great video thanks, there might be a slight typo in your code, when you do that msp = lambda x: x['sales'] / x['discount'] . And this typo can be simply corrected by this 'peace of code' unit_price = lambda x: x['sales']/(1-x['discount'])/x['quantity'], here as an output you will also have a unit price, skipping all those steps with solving the infinity problem in your code, when you do that msp =

Sanzhar_Kadyrakunov