Python Pandas Tutorial 24 | How to loop in all the pandas dataframe columns and modify

preview_player
Показать описание
Hi guys...in this python pandas tutorial videos I am showing you how you can loop through all the columns of pandas dataframe and modify it according to your needs.
Рекомендации по теме
Комментарии
Автор

how do i create a line plot of 'species' versus all other columns data i.e sepal_length, sepal_width etc other keys in a 'for loop'

mittaliaf
Автор

Hello,
You explained the concept very clear.
My question: I want to loop pandas dataframe column's rows and change its value.
For example: I have a column name "sex" with values M or F. I want to loop over this column and modify the values of M to 1 and F to 0.
Could you please help me out.
I asked you because i found your video is relating my problem.

Thank you for your video.

abhijeettiwari