import pandas as pd
df1 = pd.read_excel("E09EXAMPLE.xlsx", skiprows=1)
df1
|
Unnamed: 0 |
Year |
Team |
Match |
Champion |
Runners-up |
Third |
Fourth |
Goal |
Attendance |
HostCountry |
Unnamed: 11 |
Unnamed: 12 |
Unnamed: 13 |
Unnamed: 14 |
Unnamed: 15 |
Unnamed: 16 |
Unnamed: 17 |
| 0 |
NaN |
1930 |
13 |
18 |
Uruguay |
Argentina |
USA |
Yugoslavia |
70 |
590.549 |
Uruguay |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 1 |
NaN |
1934 |
16 |
17 |
Italy |
Czechoslovakia |
Germany |
Austria |
70 |
363 |
Italy |
NaN |
좌측 표는 역대 월드컵대회의 자료이다 |
NaN |
NaN |
NaN |
NaN |
NaN |
| 2 |
NaN |
1938 |
15 |
18 |
Italy |
Hungary |
Brazil |
Sweden |
84 |
375.7 |
France |
NaN |
좌측 표를 |
NaN |
NaN |
NaN |
NaN |
NaN |
| 3 |
NaN |
1950 |
13 |
22 |
Uruguay |
Brazil |
Sweden |
Spain |
88 |
1.045.246 |
Brazil |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 4 |
NaN |
1954 |
16 |
26 |
Germany |
Hungary |
Austria |
Uruguay |
140 |
768.607 |
Switzerland |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 5 |
NaN |
1958 |
16 |
35 |
Brazil |
Sweden |
France |
Germany |
126 |
819.81 |
Sweden |
NaN |
년도 |
개최국 |
1위 |
2위 |
3위 |
4위 |
| 6 |
NaN |
1962 |
16 |
32 |
Brazil |
Czechoslovakia |
Chile |
Yugoslavia |
89 |
893.172 |
Chile |
NaN |
1930 |
Uruguay |
Uruguay |
Argentina |
USA |
Yugoslavia |
| 7 |
NaN |
1966 |
16 |
32 |
England |
Germany |
Portugal |
Soviet Union |
89 |
1.563.135 |
England |
NaN |
... |
... |
... |
... |
... |
... |
| 8 |
NaN |
1970 |
16 |
32 |
Brazil |
Italy |
Germany |
Uruguay |
95 |
1.603.975 |
Mexico |
NaN |
2014 |
Brazil |
Germany |
Argentina |
Netherlands |
Brazil |
| 9 |
NaN |
1974 |
16 |
38 |
Germany |
Netherlands |
Poland |
Brazil |
97 |
1.865.753 |
Germany |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 10 |
NaN |
1978 |
16 |
38 |
Argentina |
Netherlands |
Brazil |
Italy |
102 |
1.545.791 |
Argentina |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 11 |
NaN |
1982 |
24 |
52 |
Italy |
Germany |
Poland |
France |
146 |
2.109.723 |
Spain |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 12 |
NaN |
1986 |
24 |
52 |
Argentina |
Germany |
France |
Belgium |
132 |
2.394.031 |
Mexico |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 13 |
NaN |
1990 |
24 |
52 |
Germany |
Argentina |
Italy |
England |
115 |
2.516.215 |
Italy |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 14 |
NaN |
1994 |
24 |
52 |
Brazil |
Italy |
Sweden |
Bulgaria |
141 |
3.587.538 |
USA |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 15 |
NaN |
1998 |
32 |
64 |
France |
Brazil |
Croatia |
Netherlands |
171 |
2.785.100 |
France |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 16 |
NaN |
2002 |
32 |
64 |
Brazil |
Germany |
Turkey |
Korea Republic |
161 |
2.705.197 |
Korea/Japan |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 17 |
NaN |
2006 |
32 |
64 |
Italy |
France |
Germany |
Portugal |
147 |
3.359.439 |
Germany |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 18 |
NaN |
2010 |
32 |
64 |
Spain |
Netherlands |
Germany |
Uruguay |
145 |
3.178.856 |
South Africa |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
| 19 |
NaN |
2014 |
32 |
64 |
Germany |
Argentina |
Netherlands |
Brazil |
171 |
3.386.810 |
Brazil |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
df1 = df1.loc[:,"Year":"HostCountry" ]
df1 = df1.iloc[:, [0, 9, 3, 4, 5, 6]]
df1
|
Year |
HostCountry |
Champion |
Runners-up |
Third |
Fourth |
| 0 |
1930 |
Uruguay |
Uruguay |
Argentina |
USA |
Yugoslavia |
| 1 |
1934 |
Italy |
Italy |
Czechoslovakia |
Germany |
Austria |
| 2 |
1938 |
France |
Italy |
Hungary |
Brazil |
Sweden |
| 3 |
1950 |
Brazil |
Uruguay |
Brazil |
Sweden |
Spain |
| 4 |
1954 |
Switzerland |
Germany |
Hungary |
Austria |
Uruguay |
| 5 |
1958 |
Sweden |
Brazil |
Sweden |
France |
Germany |
| 6 |
1962 |
Chile |
Brazil |
Czechoslovakia |
Chile |
Yugoslavia |
| 7 |
1966 |
England |
England |
Germany |
Portugal |
Soviet Union |
| 8 |
1970 |
Mexico |
Brazil |
Italy |
Germany |
Uruguay |
| 9 |
1974 |
Germany |
Germany |
Netherlands |
Poland |
Brazil |
| 10 |
1978 |
Argentina |
Argentina |
Netherlands |
Brazil |
Italy |
| 11 |
1982 |
Spain |
Italy |
Germany |
Poland |
France |
| 12 |
1986 |
Mexico |
Argentina |
Germany |
France |
Belgium |
| 13 |
1990 |
Italy |
Germany |
Argentina |
Italy |
England |
| 14 |
1994 |
USA |
Brazil |
Italy |
Sweden |
Bulgaria |
| 15 |
1998 |
France |
France |
Brazil |
Croatia |
Netherlands |
| 16 |
2002 |
Korea/Japan |
Brazil |
Germany |
Turkey |
Korea Republic |
| 17 |
2006 |
Germany |
Italy |
France |
Germany |
Portugal |
| 18 |
2010 |
South Africa |
Spain |
Netherlands |
Germany |
Uruguay |
| 19 |
2014 |
Brazil |
Germany |
Argentina |
Netherlands |
Brazil |
df1.to_clipboard(index=False)
import pandas as pd
df1 = pd.read_excel("E09EXAMPLE.xlsx", skiprows=1)
df1 = df1.loc[:,"Year":"HostCountry"]
df1 = df1.iloc[:,[0,9,3,4,5,6]]
df1.to_clipboard(index=False)