-
Jupyter-html tableCording/Python 2021. 1. 19. 21:51
import pandas as pd
df = pd.read_html('https://en.wikipedia.org/wiki/All-time_Olympic_Games_medal_table')
print(df)
df[1]
import pandas as pd
df = pd.read_html('https://en.wikipedia.org/wiki/All-time_Olympic_Games_medal_table', header=0, index_col=0)
print(df)
df[1]
summer = df[1].iloc1:,:5]
summer
summer.colums = ['경기수', '금', '은', '동', '계']
summer.sort_values('금', ascending=False)
summer.to_excel('하계올림픽메달.xlsx')
df2 = df[df['B']>0.4]
df2
'Cording > Python' 카테고리의 다른 글
Juypter-data2 (0) 2021.01.20 Juypter-계산 (0) 2021.01.20 Jupyter-data, csv (0) 2021.01.17 jupyter-graph (0) 2021.01.13 Jupyter-data(re) (0) 2021.01.12