Olympics Data Analysis | Data Analysis Project | Machine Learning with Deployment

  Рет қаралды 83,852

CampusX

CampusX

Күн бұрын

In this video, I will be building an Olympics Data Analysis Web Application using Streamlit. For development, I will be using Python and Pandas. For plotting, I will be using Seaborn and Plotly libraries. The project will also be deployed to Heroku.
Live Demo: oda-campusx.herokuapp.com/
Dataset Link: www.kaggle.com/heesoo37/120-y...
Code Used: github.com/campusx-official/o...
============================
Do you want to learn from me?
Check my affordable mentorship program at : learnwith.campusx.in/s/store
============================
📱 Grow with us:
CampusX' LinkedIn: / campusx-official
CampusX on Instagram for daily tips: / campusx.official
My LinkedIn: / nitish-singh-03412789
Discord: / discord
E-mail us at support@campusx.in
⌚Time Stamps⌚
0:00 - Introduction
01:37 - Demo
09:10 - Dataset
10:32 - Setting up the Project
13:45 - Medal Tally
01:09:43 - Overall Analysis
01:43:50 - Country-wise Analysis
02:04:26 - Athlete Analysis
02:30:09 - Heroku Deployment
02:34:06 - Outro

Пікірлер: 183
@techtonik7
@techtonik7 2 жыл бұрын
Your pandas data manipulation skills are excellent. Thank you for the detailed analysis with good web app architecture.
@4549abhi
@4549abhi 2 жыл бұрын
quite insightful video. Learned a lot from this. Thanks
@akhilgadwal7631
@akhilgadwal7631 2 жыл бұрын
one of the best project sir respect uh
@sandippatel6999
@sandippatel6999 3 жыл бұрын
very helpful make more video on this kind of project
@mariachibacon4534
@mariachibacon4534 2 жыл бұрын
Sir NaN region values most can be solved by replacing SIngapore as SGP instead of SIN. And adding TUV as Tuvalu. Only refugees team remains I hope you see this
@godhulimunshi1166
@godhulimunshi1166 3 жыл бұрын
Sir, your videos are really insightful, only after you brought to notice I got to know about the discrepancy in data...continue making such videos... I am eagerly waiting for videos on gradient boosting and Xgboost
@PIYUSH-lz1zq
@PIYUSH-lz1zq 2 жыл бұрын
BRO , flask doesn't need then when streamlit is doing everthing ? when flask is useful ?
@kadambaripatel1758
@kadambaripatel1758 Жыл бұрын
It was very helpful.Thanks!
@abhiavasthi624
@abhiavasthi624 Жыл бұрын
Completed. Thanks a lot for making this video. I can't imagine the effort you're putting in to make such videos for us.
@varungadani5540
@varungadani5540 Жыл бұрын
did you completed full project seeing video or did you downloaded it from github
@abhiavasthi624
@abhiavasthi624 Жыл бұрын
@@varungadani5540 yes completed on my own.
@varungadani5540
@varungadani5540 Жыл бұрын
@@abhiavasthi624 if i got stuck anywhere will you help me? can you give me your linkedin username
@newtanagmukhopadhyay4716
@newtanagmukhopadhyay4716 Жыл бұрын
@@varungadani5540 where you got stuck?
@varungadani5540
@varungadani5540 Жыл бұрын
@@newtanagmukhopadhyay4716 completed the project , i got some some errors at end so write code of one graph
@KastijitBabar
@KastijitBabar Ай бұрын
Thank You so much, This helped me a lot.
@dswithanand
@dswithanand 2 жыл бұрын
Thank u for this video…learned a lot from this..I hv one request ..can u plz make a video on multi class classification project..
@pradipsah9900
@pradipsah9900 Жыл бұрын
sir, at 59:12 sec, in function fetch_medal_tally, you have mistakenly written 2016 instead of int(year) in 8th line of the function.
@mohammadarsalanadil1057
@mohammadarsalanadil1057 2 жыл бұрын
Thank you so much brother. U are doing really great thing. God bless u
@PIYUSH-lz1zq
@PIYUSH-lz1zq 2 жыл бұрын
BRO , flask doesn't need then when streamlit is doing everthing ? when flask is useful ?
@BitsAndBytesAI
@BitsAndBytesAI 8 ай бұрын
Prerequisites kiya hai is video ki explain anyone
@gopikishan1028
@gopikishan1028 2 жыл бұрын
Hatts off to your efforts and time sir 👍 Thank you very much
@nishufatehiansari2264
@nishufatehiansari2264 2 ай бұрын
Hello ....... Friend , Kya aapka olympic wala project complete chuka hai , to mri help kar dijye please
@nishufatehiansari2264
@nishufatehiansari2264 2 ай бұрын
Bhut saari errors aa rahi hai , Kya mujhe aapka contact number mil sakta hai ? Agar aapko bura naa lage to ?
@_SaheliChakraborty
@_SaheliChakraborty Жыл бұрын
in the medal tally part when I am selecting a country with no medals..an empty table is coming instead of printing zeros..how to fix this
@allrounder8699
@allrounder8699 4 ай бұрын
The heatmap before 2:00 hrs does not apply in all countries...wgen u select countries like aruba or some pther it give a error which I'm not able to understand
@shaileshmore2036
@shaileshmore2036 2 жыл бұрын
Thak. You sir nice video
@shadabmathematics9672
@shadabmathematics9672 2 жыл бұрын
Sir I follow you since last month ....and learn a lot.......I am learning data scn since last 6month ......my request is to make a video on "bike sharing demand"
@campusx-official
@campusx-official 2 жыл бұрын
Will try
@PIYUSH-lz1zq
@PIYUSH-lz1zq 2 жыл бұрын
BRO , flask doesn't need then when streamlit is doing everthing ? when flask is useful ?
@campusx-official
@campusx-official 2 жыл бұрын
@@PIYUSH-lz1zq for building apis to serve for android apps
@Twentizz
@Twentizz 2 жыл бұрын
Make project on prediction type of any dataset end to end with everything. I watched till end
@naveenkumarjadi2915
@naveenkumarjadi2915 3 жыл бұрын
Great sir
@nikitasinha8181
@nikitasinha8181 Жыл бұрын
Thank you so much sir
@harshalpatil3744
@harshalpatil3744 3 жыл бұрын
Sir will you please make project on resume analysis ..in which if user upload the resume then model will tell how to improve resume
@mellowftw
@mellowftw 3 жыл бұрын
Sir can you please provide the jupyter notebook it will be really helpful I've just started learning data analysis
@tanishagrawal9091
@tanishagrawal9091 5 ай бұрын
Everytime i refresh the dataset giving error showing duplicate column names for Gold Silver Bronze
@rajaneeshray7502
@rajaneeshray7502 Жыл бұрын
hi sir, I am ficing issue at 1:21, I am not able to plot that graph , gone thru your updated code dont know why you guys are using col
@shubhammurarka6589
@shubhammurarka6589 Жыл бұрын
we already have region name in team column so why are we merging region data from other file?
@PIYUSH-lz1zq
@PIYUSH-lz1zq 2 жыл бұрын
how can i streach my table ?... viewing medal tally table full column names are now showing !!
@shriyak7872
@shriyak7872 5 ай бұрын
hii @CampusX I tried running this code, I wanted to created radio buttons just like you did, and I was trying to add select boxes but no matter what technique I use, I can either create a radio button or a slect box , but not both(like you have done) can you help me out please ?
@sthitodhikarmakar2889
@sthitodhikarmakar2889 5 ай бұрын
Which algorithm is used to build this project
@mdjidmi8822
@mdjidmi8822 3 жыл бұрын
Great bro
@BeDesi1
@BeDesi1 Жыл бұрын
Thanks bro
@vatsalyaa.m
@vatsalyaa.m 7 ай бұрын
sir how to deploy this on RENDER ? what all do we have to mention in requirements.txt ?
@gourabbiswas6961
@gourabbiswas6961 6 ай бұрын
how to attach csv files in pycharm project?
@Twentizz
@Twentizz 2 жыл бұрын
is it possible to combine 202 Tokyo Olympics too how to do that any ideas or clips to merger those
@ashutoshkadam3845
@ashutoshkadam3845 26 күн бұрын
In my pycharm I don't have requirement. TXT section. Someone please help me out
@sonaganeshg3312
@sonaganeshg3312 Жыл бұрын
I'm getting preprocess has no attribute 'preprocess' error. Is this due to change in version. I'm using python 3.10 version.
@rajankumar7668
@rajankumar7668 23 күн бұрын
Sir ,can I use VS code instance of pycharm for this project?
@user-ri9ge2pm4n
@user-ri9ge2pm4n 9 ай бұрын
Sir how can we add medal prediction using algorithm also in this project
@saurabhbarasiya4721
@saurabhbarasiya4721 3 жыл бұрын
Great yrr
@krishnendubarman5998
@krishnendubarman5998 Жыл бұрын
Bro.. I am getting value error while refreshing the streamlit url. Please help 🙏
@pranav9808
@pranav9808 3 жыл бұрын
Bhai your videos r awsome i recommended ur channel to almost everyone in my friend circle. Dont know why it dosnt giv your videos in the search result while seraching something relvent to ml. Can you please make a model for stock price prediction while coming to the timeseries. It will be a very useful and intresting project
@campusx-official
@campusx-official 3 жыл бұрын
Sure
@PIYUSH-lz1zq
@PIYUSH-lz1zq 2 жыл бұрын
BRO , flask doesn't need then when streamlit is doing everthing ? when flask is useful ?
@purvakulkarni5041
@purvakulkarni5041 Жыл бұрын
I am getting ImportError: FigureFactory.create_distplot requires scipy could yoy please help me out,sir? I have tried : 1) pip install scipy (didn't work) 2) import scipy (didn't work)
@aryanraina1932
@aryanraina1932 Жыл бұрын
Import pyplot
@ranirathore4176
@ranirathore4176 Жыл бұрын
Why does my streamline app kept on showing please wait.....
@Twentizz
@Twentizz 2 жыл бұрын
is it possible to use prediction model on this project and predict upcoming stats of a character? I don't know how to use but this is my idea
@shadabmathematics9672
@shadabmathematics9672 2 жыл бұрын
Nitish sir can I get the jupyter notebook code .....so that I can practice
@mayankdobhal3110
@mayankdobhal3110 4 күн бұрын
is there any other platform to deploy than heroku?
@46mithleshkumaryadav43
@46mithleshkumaryadav43 Жыл бұрын
Bhai 13:15 pr run krne se error aa rha TypeError: Plain typing.NoReturn is not valid as a type argument Bhai pls help to resolve it
@RiyaSingh-yl3md
@RiyaSingh-yl3md Жыл бұрын
Sir application is showing some error. Can you please fix it ASAP.
@AmanSharma-jm2bl
@AmanSharma-jm2bl 2 жыл бұрын
Can I get the jupyter notebook
@RanuBhasker6
@RanuBhasker6 9 ай бұрын
I am getting errors on running project can u help me in that
@achintkaur51
@achintkaur51 3 жыл бұрын
do u provide any courses
@whosths862
@whosths862 7 күн бұрын
TS- 1:16:25 Please replace `st.beta_columns` with `st.columns` . `st.beta_columns` will be removed after 2021-11-02. note- from google
@pratikakole4853
@pratikakole4853 2 жыл бұрын
sir why didn't create machine learning model on this dataset. like logisticRegression, Support vector machine, linearregression, etc
@campusx-official
@campusx-official 2 жыл бұрын
What is supposed to be predicted?
@mohitkushwaha8974
@mohitkushwaha8974 Жыл бұрын
33.45 hrs- 230 rows se 205 rows kaise hua ??
@Sciddhanto_Sinha
@Sciddhanto_Sinha 3 күн бұрын
Sir, where is the jupyter ntbk file
@kuhusharma9600
@kuhusharma9600 Жыл бұрын
i keep getting the error : module 'streamlit' has no attribute 'beta_columns' can someone help me with that ?
@campusx-official
@campusx-official Жыл бұрын
Use columns instead of beta_columns
@yashjoshi3820
@yashjoshi3820 2 жыл бұрын
Sir I am having deployment issues. App not compatible with the buildpack is the issue I am facing, due to which the app is not being deployed. Please sir can you help me on it.
@siddharthpawarshortschanne966
@siddharthpawarshortschanne966 Жыл бұрын
Can you create driver aggressive behaviour project
@04adarshsingh47
@04adarshsingh47 5 ай бұрын
sir deploy me error aa Raha Hai
@6177_AdityaKumarPrajapati
@6177_AdityaKumarPrajapati 5 ай бұрын
def most_successful(df,sport): temp_df = df.dropna(subset=['Medal']) if sport != 'Overall': temp_df = temp_df[temp_df['Sport'] == sport] return temp_df['Name'].value_counts().reset_index().head(15).merge(df,left_on='Name',right_on='count',how='left') Error: KeyError: 'count' can someone tell how to resolve it.
@sreyag4766
@sreyag4766 2 ай бұрын
in first 30 min, did any one faced any problems regarding the medal column near gold,silver and bronze counts?
@jansigoswami8435
@jansigoswami8435 17 күн бұрын
yes
@newtanagmukhopadhyay4716
@newtanagmukhopadhyay4716 Жыл бұрын
hi sir, i did not quite understood what exactly beta_columns does. can someone please explain to me?
@aloktiwari2641
@aloktiwari2641 Жыл бұрын
Same ..so I remove beta than its work😅
@user-pz5gs5kv8k
@user-pz5gs5kv8k 10 ай бұрын
At 25:18 I'm getting an error "FutureWarning: The default value of numeric_only in DataFrameGroupBy.sum is deprecated. In a future version, numeric_only will default to False. Either specify numeric_only or select only columns which should be valid for the function. df.groupby('NOC').sum()[['Gold','Silver','Bronze']]" KeyError: "None of [Index(['Gold', 'Silver', 'Bronze'], dtype='object')] are in the [columns]" Please help me with proper solution
@gopal1291
@gopal1291 10 ай бұрын
df.groupby('NOC').sum()[['Gold', 'Silver', 'Bronze']].sort_values('Gold', ascending=False).reset_index() try this it will work
@RanuBhasker6
@RanuBhasker6 10 ай бұрын
i am also getting this problem how to solve any one tell me
@user-se3nx9pv3k
@user-se3nx9pv3k 8 ай бұрын
did you resolve it?
@gopal1291
@gopal1291 8 ай бұрын
@@user-se3nx9pv3k yes
@greenchilly7055
@greenchilly7055 Ай бұрын
Instead of st.beta_coloumns write st.columns
@krishnendubarman8490
@krishnendubarman8490 Жыл бұрын
raise ImportError("FigureFactory.create_distplot requires scipy") ------ showing this error while plotting distplot. Please give any solution.
@Rits-bt4zu
@Rits-bt4zu 7 ай бұрын
pip install scipy
@adhipjajoo4892
@adhipjajoo4892 13 күн бұрын
@@Rits-bt4zu It is still not working
@BitsAndBytesAI
@BitsAndBytesAI 8 ай бұрын
Prerequisites kiya hai is video ki explain anyone
@someotherstuffs
@someotherstuffs 3 жыл бұрын
Your videos are awesome!!!!! Sir a request! Can you please Make a tutorial on end to end project of Movie Recommendation system 🙏🏻
@campusx-official
@campusx-official 3 жыл бұрын
kzfaq.info/get/bejne/Z96kpax23L_Dqo0.html
@someotherstuffs
@someotherstuffs 3 жыл бұрын
@@campusx-official Thankyou so much Sir 🙏🏻
@PIYUSH-lz1zq
@PIYUSH-lz1zq 2 жыл бұрын
BRO , flask doesn't need then when streamlit is doing everthing ? when flask is useful ?
@RadhikaMantri-li3mm
@RadhikaMantri-li3mm 11 ай бұрын
nations_over_time = df.drop_duplicates(['Year', col])['Year'].value_counts().reset_index( ).sort_values('index') I am getting error because of sort_values(index) keyword error
@Moonlight-1432
@Moonlight-1432 10 ай бұрын
Same error
@Moonlight-1432
@Moonlight-1432 10 ай бұрын
What's the solution
@realnamkha9974
@realnamkha9974 9 ай бұрын
nations_over_time = df.drop_duplicates(['Year', col])['Year'].value_counts().reset_index().sort_values("Year") nations_over_time.rename(columns={'Year':'Edition','count':'No of countries'},inplace=True) return nations_over_time
@pallavisadavarte6166
@pallavisadavarte6166 3 жыл бұрын
Sir this line " medal_tally = medal_tally.groupby('region').sum()[['Gold', 'Silver', 'Bronze']].sort_values('Gold', ascending=False).reset_index() " is giving error at 'region'... Please tell me how to resolve it?
@jaivik9093
@jaivik9093 2 жыл бұрын
me also
@goatknowledge9428
@goatknowledge9428 2 жыл бұрын
me also, please give me a answer
@arindam_mahato
@arindam_mahato Жыл бұрын
After merging the datasets(athlete_events & noc_regions) assign the value into 'df' .....then run the above code
@siddharthparmar4329
@siddharthparmar4329 Жыл бұрын
I am doing this project today and getting the same type of error
@siddharthparmar4329
@siddharthparmar4329 Жыл бұрын
no no we have to merge the both csv then we have to save it in df again
@acharjyaarijit
@acharjyaarijit Жыл бұрын
Thank you sir for this wonderful video. Sir Heroku is not free anymore.. can anyone please explain how to deploy this project on any other platform.
@pawankumar-ou7bz
@pawankumar-ou7bz Жыл бұрын
deploy in streamlit even they have their own setup to deploy
@BitsAndBytesAI
@BitsAndBytesAI 8 ай бұрын
Prerequisites kiya hai is video ki explain anyone
@078_rishujha8
@078_rishujha8 Жыл бұрын
scatterplot takes 0 to 1 arguments but 2 was given, error !
@nikitasinha8181
@nikitasinha8181 Жыл бұрын
Write x= temp_df['Weight'] , y= temp_df['Height']
@prabhatdangi9262
@prabhatdangi9262 2 жыл бұрын
Sir why can't heroku link of yours is not working ?
@campusx-official
@campusx-official 2 жыл бұрын
Free server. Trial period over
@vamshireddyj2514
@vamshireddyj2514 Жыл бұрын
sir did you used django framework here
@anupamjha827
@anupamjha827 Жыл бұрын
Streamlit
@mellowftw
@mellowftw 3 жыл бұрын
1:28:40
@rushi7x
@rushi7x Жыл бұрын
is this project used ml algorithms ? how can we say this project as ml project can anyone please explain !
@DsaDecoder
@DsaDecoder Жыл бұрын
NO, This is actually data analysis project. After processing the data only u can apply ml algorithms.
@rushi7x
@rushi7x Жыл бұрын
@@DsaDecoder can i say this project as ml project as no algorithm is used in it
@Robin_Tdhr
@Robin_Tdhr Жыл бұрын
@@rushi7x no you cant say ml project. You can present this as Data Analyis project
@all_ez_well4743
@all_ez_well4743 Жыл бұрын
can anyone please tell how to paste the csv files into pycharm
@pallapranathi504
@pallapranathi504 Жыл бұрын
just copy that file, n go to pycharm ,n tap on the folder you want to paste, and paste there.
@varunahlawat9013
@varunahlawat9013 Жыл бұрын
A Climate change analysis project.
@everything_u_need1072
@everything_u_need1072 Жыл бұрын
Need subtitle
@mellowftw
@mellowftw 3 жыл бұрын
2:30:14
@sanjanasanju2449
@sanjanasanju2449 11 ай бұрын
Which algorithm is used here??
@gopal1291
@gopal1291 10 ай бұрын
One hot encoding
@axhoang
@axhoang Ай бұрын
genuine question is this in English? bc I do not understand a word you are saying
@jansigoswami8435
@jansigoswami8435 17 күн бұрын
hindi + english
@anubratamallick5502
@anubratamallick5502 9 ай бұрын
2:04:22
@everything_u_need1072
@everything_u_need1072 Жыл бұрын
Need in English
@secondarypemail7181
@secondarypemail7181 Жыл бұрын
Heroku ne free apps host karna hi nikal diya😥😥
@pallapranathi504
@pallapranathi504 Жыл бұрын
KeyError: "['index', 'Name_x'] not in index" I'm getting this error
@ayushgajbhiye36
@ayushgajbhiye36 Жыл бұрын
Same, did ur error got resolved? Plz reply bcz i'm stuck over there
@codingmo314
@codingmo314 Жыл бұрын
@@ayushgajbhiye36 +1
@saranshjaiswal1420
@saranshjaiswal1420 Жыл бұрын
just replace index by year and region with count pycham is name them year and count
@yashika67688
@yashika67688 Жыл бұрын
@@saranshjaiswal1420 please ellaborate a little
@minhazriyam6272
@minhazriyam6272 Жыл бұрын
Have you guys found the solutions?
@devanshipokhriyal
@devanshipokhriyal 2 ай бұрын
no
@humerashaikh3618
@humerashaikh3618 3 жыл бұрын
Can u share your LinkedIn profile pls
@campusx-official
@campusx-official 3 жыл бұрын
www.linkedin.com/in/nitish-singh-03412789/
@anujkumar7943
@anujkumar7943 4 ай бұрын
KISI NE iss project ka ppt aur report tyar kaara kya ...college project ke liye ...bo please ,msgs krde
@ImranAnsari-bx3qj
@ImranAnsari-bx3qj 2 жыл бұрын
Please sir provide the Solution of this question .. 1) In which year india won First gold medal in summer Olympics? 2) which sport is having most female gold medal lists? 3) which events is most popular in term on Number of player? 4) which player has won most No. Gold medal of medals? 5) which player has won most No. of medals? 6) which sports is having most No. Of medals so far? 7) which sports is having most No. Of gold medal so far?
@kumarabhishek1064
@kumarabhishek1064 2 жыл бұрын
You can find answers for this using simple pandas query like you do for sql.
@AdityaSingh-vd8kv
@AdityaSingh-vd8kv 4 ай бұрын
def most_successful(df, sport): temp_df = df.dropna(subset=['Medal']) if sport != 'Overall': temp_df = temp_df[temp_df['Sport'] == sport] x = temp_df['Name'].value_counts().reset_index().head(15).merge(df, left_on='index', right_on='Name', how='left')[ ['index', 'Name_x', 'Sport', 'region']].drop_duplicates('index') x.rename(columns={'index': 'Name', 'Name_x': 'Medals'}, inplace=True) return x key error: 'index' plz help stuck in here from 5 days😢
@ankitakaushik1168
@ankitakaushik1168 4 ай бұрын
def most_successful(df, sport): temp_df = df.dropna(subset=['Medal']) if sport != 'Overall': temp_df = temp_df[temp_df['Sport'] == sport] count_df = temp_df['Name'].value_counts().reset_index().head(20) count_df.columns = ['Name', 'Medals'] count_df['Medals'] = count_df['Medals'].astype(str) merged_df = pd.merge(count_df, df, left_on='Name', right_on='Name', how='left').drop_duplicates(subset='Name') result_df = merged_df[['Name', 'Medals', 'Sport', 'region']] result_df.rename(columns={'Name': 'Athlete'}, inplace=True) return result_df
@I-Umer
@I-Umer Ай бұрын
def fetch_medal_tally(year, country): flag = 0 if year == 'Overall' and country == 'Overall': temp_df = medal_df elif year == 'Overall' and country != 'Overall': flag = 1 temp_df = medal_df[medal_df['region'] == country] elif year != 'Overall' and country == 'Overall': temp_df = medal_df[medal_df['Year'] == int(year)] elif year != 'Overall' and country != 'Overall': temp_df = medal_df[(medal_df['Year'] == int(year)) & (medal_df['region'] == country)] if flag == 1: x = temp_df.groupby('Year').sum()[['Gold', 'Silver', 'Bronze']].sort_values('Year').reset_index() else: x = temp_df.groupby('region').sum()[['Gold', 'Silver', 'Bronze']].sort_values('Gold', ascending=False).reset_index() x['Total'] = x['Gold'] + x['Silver'] + x['Bronze'] print(x) # Example call fetch_medal_tally(year='1956', country='Pakistan')
@yogindersyal802
@yogindersyal802 3 жыл бұрын
Sir real estate project
@campusx-official
@campusx-official 3 жыл бұрын
kzfaq.info/get/bejne/eryonqxiu9PUc58.html
@khusbuu5625
@khusbuu5625 Жыл бұрын
Thank you Sir
@RanuBhasker6
@RanuBhasker6 9 ай бұрын
Bro.. I am getting value error while refreshing the streamlit url. Please help 🙏
@nishufatehiansari2264
@nishufatehiansari2264 2 ай бұрын
Streamlit has no attribute beta columns Please solution
@greenchilly7055
@greenchilly7055 Ай бұрын
Instead of st.beta_coloumns write st.columns
@6177_AdityaKumarPrajapati
@6177_AdityaKumarPrajapati 5 ай бұрын
def most_successful(df,sport): temp_df = df.dropna(subset=['Medal']) if sport != 'Overall': temp_df = temp_df[temp_df['Sport'] == sport] return temp_df['Name'].value_counts().reset_index().head(15).merge(df,left_on='Name',right_on='count',how='left') Error: KeyError: 'count' can someone tell how to resolve it.
@ankitakaushik1168
@ankitakaushik1168 4 ай бұрын
def most_successful(df, sport): temp_df = df.dropna(subset=['Medal']) if sport != 'Overall': temp_df = temp_df[temp_df['Sport'] == sport] count_df = temp_df['Name'].value_counts().reset_index().head(20) count_df.columns = ['Name', 'Medals'] count_df['Medals'] = count_df['Medals'].astype(str) merged_df = pd.merge(count_df, df, left_on='Name', right_on='Name', how='left').drop_duplicates(subset='Name') result_df = merged_df[['Name', 'Medals', 'Sport', 'region']] result_df.rename(columns={'Name': 'Athlete'}, inplace=True) return result_df
@rajareddyraju6773
@rajareddyraju6773 15 күн бұрын
49:31
Solving real world data science tasks with Python Pandas!
1:26:07
Keith Galli
Рет қаралды 1,5 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 11 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 33 МЛН
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 195 МЛН
Predict Football Match Winners With Machine Learning And Python
44:43
Olympics Dataset Analysis | Real World Project | Power BI
37:15
Data Visionary
Рет қаралды 11 М.