I was just wondering if on you could have just modified the lambda expression so it could just do all the calculations in place like so:country_grp["LanguageWorkedWith"].apply(lambda country_ser: (country_ser.str.contains("Python").sum()*/country_ser.value_counts().sum())*100)What I tried to do was to count the sum of total respondents for each country and do all the necessary calculations inside the lambda, and, though the result that I got were similar to yours, they still were slightly different.(00:35:38 - 00:49:06)
Python Pandas Tutorial (Part 8): Grouping and Aggregating - Analyzing and Exploring Your Data
Corey Schafer
※本サイトに掲載されているチャンネル情報や動画情報はYouTube公式のAPIを使って取得・表示しています。
Timetable
動画タイムテーブル
動画数:236件