문제
Find the top 10 ranked songs in 2010
What were the top 10 ranked songs in 2010? Output the rank, group name, and song name but do not show the same song twice. Sort the result based on the year_rank in ascending order.
2010년에 top10에 들었던 노래 조회하기. 같은 노래가 중복되면 안되고, year_rank를 기준 오름차순으로 정렬하라
코드
# Import your libraries
import pandas as pd
# Start writing code
billboard_top_100_year_end.head()
billboard_top_100_year_end[
(billboard_top_100_year_end['year'] == 2010)&(billboard_top_100_year_end['year_rank'] <= 10)
]
[['year_rank','group_name','song_name']].drop_duplicates().sort_values(by=['year_rank'], axis=0)
출처
반응형
'Algorithm > Python' 카테고리의 다른 글
[stratascratch] Order Details(Python) (0) | 2021.08.15 |
---|---|
[stratascratch] Largest Olympics(Python) (0) | 2021.08.15 |
[stratascratch] number of bathrooms and bedrooms(Python) (0) | 2021.08.15 |
[stratascratch] Count the number of movies that Abigail Breslin nominated for oscar(Python) (0) | 2021.08.07 |
[프로그래머스] 모의고사 (Python) (0) | 2021.07.22 |