Тёмный

Python sample interview question | Data Analyst Practice Problem #3 

Alex Sington
Подписаться 1,8 тыс.
Просмотров 1,9 тыс.
50% 1

Subscribe to the channel for more of these practice problems in the future!
QUESTION: What are all the unique Premier League matchups in the data set, and how many times has each matchup been played? Switching the home and away teams is NOT a unique matchup. For example, HomeTeam = 'Arsenal' and AwayTeam = 'Chelsea' is the same matchup as HomeTeam = 'Chelsea' and AwayTeam = 'Arsenal'.
Contact me:
alex.sington@gmail.com
/ alex-sington-b7751a181
0:00: Intro
0:17: Problem
1:36: Solution walkthrough

Опубликовано:

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 7   
@FredyArg
@FredyArg Год назад
Thanks for posting these videos, they are very helpful…question for you… how do you take the values of a column and add them to a row, separated by a semicolon? I’m trying to copy over 12k email addresses, so they can easily be copied and pasted into outlook.
@alexsington
@alexsington Год назад
I'm glad this video was helpful! To answer your question: 1) Define your column as a list: emails_list = list(df['column_name']) 2) Create one single string (separated by semicolons) out of all values in the list: '; '.join(emails_list) With 12k emails, that string will be massive, but that code^ should work. Let me know if this is helpful!
@FredyArg
@FredyArg Год назад
@@alexsington thank you this created an output with all the emails as needed, trying to save to an excel or csv file places back into a column...
@FredyArg
@FredyArg Год назад
@@alexsington Thank you, this placed all the emails as needed, to save to a csv or excel do i just add the following? ';'.join(emails_list).to_excel('name',index=False)?
@alexsington
@alexsington Год назад
@@FredyArg You'll have to create a DataFrame to run .to_excel(). So I would run the following code: pd.DataFrame(['; '.join(emails_list)]).to_excel('file_name.xlsx', index=False)
@FredyArg
@FredyArg Год назад
@@alexsington Excellent, this worked awesome..thank you again!!! You are the best!
Далее
How to win friends and influence people
9:25
GridSearchCV using Scikit-Learn
26:13
Просмотров 51
Excel functions to search for text within cells
9:43