标签:from ike luci shape simple gui rman rda mes
world_alcohol.txt文件内容
Year,WHO region,Country,Beverage Types,Display Value 1986,Western Pacific,Viet Nam,Wine,0 1986,Americas,Uruguay,Other,0.5 1985,Africa,Cte d‘Ivoire,Wine,1.62 1986,Americas,Colombia,Beer,4.27 1987,Americas,Saint Kitts and Nevis,Beer,1.98 1987,Americas,Guatemala,Other,0 1987,Africa,Mauritius,Wine,0.13 1985,Africa,Angola,Spirits,0.39 1986,Americas,Antigua and Barbuda,Spirits,1.55 1984,Africa,Nigeria,Other,6.1 1987,Africa,Botswana,Wine,0.2 1989,Americas,Guatemala,Beer,0.62 1985,Western Pacific,Lao People‘s Democratic Republic,Beer,0 1984,Eastern Mediterranean,Afghanistan,Other,0 1985,Western Pacific,Viet Nam,Spirits,0.05 1987,Africa,Guinea-Bissau,Wine,0.07 1984,Americas,Costa Rica,Wine,0.06 1989,Africa,Seychelles,Beer,2.23 1984,Europe,Norway,Spirits,1.62 1984,Africa,Kenya,Beer,1.08 1986,South-East Asia,Myanmar,Wine,0 1989,Americas,Costa Rica,Spirits,4.51 1984,Europe,Romania,Spirits,2.67 1984,Europe,Turkey,Beer,0.44 1985,Africa,Comoros,Other, 1984,Eastern Mediterranean,Tunisia,Other,0 1985,Europe,United Kingdom of Great Britain and Northern Ireland,Wine,1.36 1984,Eastern Mediterranean,Bahrain,Beer,2.22 1987,Western Pacific,Viet Nam,Beer,0.11 1986,Europe,Italy,Other, 1986,Africa,Sierra Leone,Other,4.48 1986,Western Pacific,Micronesia (Federated States of),Wine,0 1989,Africa,Mauritius,Beer,1.6 1985,Africa,Mauritania,Other,0 1986,Europe,Russian Federation,Wine,0.8 1985,Americas,Saint Kitts and Nevis,Spirits,2.24 1987,Eastern Mediterranean,Egypt,Beer,0.07 1986,Europe,Sweden,Beer,3.04 1987,Eastern Mediterranean,Qatar,Other,0 1987,Africa,Burkina Faso,Spirits,0.01 1987,Europe,Austria,Spirits,1.9 1986,Europe,Czech Republic,Beer,6.82 1984,Europe,Ukraine,Spirits,3.06 1984,Western Pacific,China,Wine,0.03 1985,Europe,Lithuania,Other, 1989,Africa,Zimbabwe,Beer,0.19 1987,Americas,Trinidad and Tobago,Spirits,2.26 1986,Americas,Mexico,Other,0.04 1987,Americas,Nicaragua,Beer,0.7 1986,Europe,Malta,Wine,1.49 1985,Europe,Switzerland,Other,0.3 1987,Europe,Finland,Beer,3.88 1986,Eastern Mediterranean,Saudi Arabia,Wine,0 1984,Eastern Mediterranean,Kuwait,Beer,0 1984,Americas,El Salvador,Spirits,1.81 1989,Americas,Suriname,Wine,0.04 1987,Western Pacific,Viet Nam,Wine,0 1989,Europe,Croatia,Wine,5.1 1984,Eastern Mediterranean,Somalia,Spirits,0 1989,Eastern Mediterranean,Syrian Arab Republic,Other,0 1987,Eastern Mediterranean,Iran (Islamic Republic of),Other,0 1984,Western Pacific,Papua New Guinea,Spirits,0.08 1987,Americas,Suriname,Other,0 1985,Eastern Mediterranean,Libya,Other,0 1989,Americas,Bolivia (Plurinational State of),Beer,1.26 1989,Eastern Mediterranean,Somalia,Beer,0 1987,Eastern Mediterranean,Iraq,Wine,0.01 1989,Africa,Namibia,Beer,0 1989,Africa,Uganda,Beer,0.12 1986,Africa,Togo,Spirits,0.42 1986,Africa,Madagascar,Spirits,1.02 1985,Africa,Mali,Other,0.57 1987,Africa,Mauritania,Other,0 1986,Eastern Mediterranean,Pakistan,Other,0.01 1986,Americas,Bolivia (Plurinational State of),Spirits,2.06 1989,Eastern Mediterranean,Afghanistan,Other,0 1985,Africa,Comoros,Beer,0.02 1985,Africa,Cameroon,Spirits,0.01 1989,Americas,Jamaica,Other,0 1989,Europe,Finland,Other,2.09 1985,Africa,Malawi,Other,0.84 1985,Europe,Netherlands,Wine,2.54 1987,Europe,Ireland,Spirits,2.25 1986,Europe,Ukraine,Other, 1986,South-East Asia,Sri Lanka,Other,0 1985,Africa,Democratic Republic of the Congo,Wine,0.01 1986,Americas,Bahamas,Wine,1.83 1989,Eastern Mediterranean,Iraq,Wine,0.01 1987,Eastern Mediterranean,Lebanon,Beer,0.42 1986,Eastern Mediterranean,Lebanon,Wine,0.7 1989,Africa,Malawi,Wine,0.01 1989,Europe,Bulgaria,Beer,4.43 1986,Africa,Eritrea,Spirits,0 1987,Africa,Madagascar,Other, 1985,Europe,Ukraine,Spirits,3.06 1984,Africa,Niger,Other,0 1985,Europe,Luxembourg,Wine,7.38 1984,South-East Asia,Indonesia,Wine,0 1984,Africa,Equatorial Guinea,Wine,0 1985,South-East Asia,Democratic People‘s Republic of Korea,Wine,0 1987,Americas,Chile,Beer,1.49 1985,Eastern Mediterranean,Kuwait,Other, 1989,Americas,Nicaragua,Wine,0.01 1989,Africa,Central African Republic,Spirits,0.03 1986,Europe,Spain,Other,0 1986,Africa,Madagascar,Beer,0.19 1989,Eastern Mediterranean,Afghanistan,Beer,0 1986,Africa,Gambia,Other,1.96 1987,Africa,Ghana,Beer,0.26 1984,Americas,Chile,Wine,6.36 1985,Americas,Brazil,Beer,1.42 1986,Americas,Nicaragua,Spirits,2.73 1987,Europe,Portugal,Spirits,0.79 1987,Eastern Mediterranean,Bahrain,Beer,2.02 1989,Africa,Burundi,Beer,2.84 1986,Europe,Belgium,Beer,7.36 1987,Eastern Mediterranean,Iraq,Spirits,0.34 1984,Africa,Guinea-Bissau,Other,1.64 1985,Africa,Democratic Republic of the Congo,Spirits,0.01 1985,Americas,Chile,Beer,1.17 1987,Americas,Paraguay,Wine,0.36 1985,Eastern Mediterranean,Pakistan,Wine,0 1987,Eastern Mediterranean,Lebanon,Other,0 1989,Europe,Sweden,Beer,3.55 1985,Europe,Hungary,Spirits,7.01 1989,Europe,Greece,Wine,4.12 1985,Europe,Belgium,Wine,3.08 1984,South-East Asia,India,Spirits,1.14 1984,Africa,Gambia,Other,1.02 1989,Europe,Kyrgyzstan,Wine,0.72 1987,Africa,Zimbabwe,Spirits,3.44 1986,Americas,Bolivia (Plurinational State of),Beer,1.14 1984,Africa,Burundi,Beer,2.6 1989,Europe,Belgium,Beer,7.01 1985,Europe,France,Spirits,2.7 1984,Eastern Mediterranean,Saudi Arabia,Spirits,0.01 1987,Africa,Namibia,Wine,0 1986,Africa,Zambia,Wine,0.01 1989,Africa,Angola,Other,0 1989,Africa,Burkina Faso,Spirits,0 1987,Europe,Israel,Beer,0.96 1986,Africa,Gambia,Wine,0.09 1987,Americas,Antigua and Barbuda,Spirits,1.55 1987,Europe,Ireland,Beer,7.49 1986,Africa,Uganda,Wine,0 1987,Africa,Swaziland,Beer,0 1984,Americas,Canada,Spirits,3.35 1985,Western Pacific,Cambodia,Other, 1989,Europe,Czech Republic,Other, 1986,Africa,Cabo Verde,Spirits,0.44 1989,Eastern Mediterranean,United Arab Emirates,Spirits,3.69 1989,Americas,Peru,Spirits,2.99 1987,Americas,Costa Rica,Beer,0.83 1985,Europe,Czech Republic,Spirits,4.61 1987,Europe,Belgium,Beer,7.42 1986,Americas,Saint Kitts and Nevis,Beer,1.25 1985,Europe,Portugal,Spirits,0.54 1985,Western Pacific,Solomon Islands,Other,0 1985,Africa,United Republic of Tanzania,Spirits,0.14 1985,Africa,Chad,Beer,0.34 1984,Americas,Cuba,Spirits,2.06 1989,Americas,Trinidad and Tobago,Beer,2.27 1989,Americas,Guyana,Spirits,8.9 1984,Americas,Costa Rica,Beer,0.58 1985,Western Pacific,Mongolia,Other,0 1984,Eastern Mediterranean,Iraq,Wine,0.01 1987,Americas,Saint Kitts and Nevis,Wine,0.43 1987,Europe,Ukraine,Beer,1.45 1986,Europe,Norway,Other,0 1987,Eastern Mediterranean,Iran (Islamic Republic of),Spirits,0 1987,Europe,Israel,Spirits,0.74 1986,Western Pacific,Australia,Spirits,1.57 1984,Africa,Sao Tome and Principe,Spirits,0.01 1987,Americas,Peru,Beer,3.12 1984,Europe,Spain,Spirits,3.68 1985,Europe,Greece,Spirits,3.49 1989,Eastern Mediterranean,Bahrain,Spirits,3.56 1985,Africa,Zambia,Other,2.07 1984,Europe,Slovenia,Beer,3.42 1987,Africa,Zimbabwe,Wine,0.03 1989,Africa,Benin,Beer,0.99 1984,Africa,Algeria,Spirits,0.01 1986,Africa,Togo,Beer,2.21 1987,Africa,Chad,Other,0 1986,Americas,Venezuela (Bolivarian Republic of),Wine,0.13 1987,Americas,Ecuador,Wine,0.05 1985,Europe,Iceland,Beer,1.16 1989,Africa,Liberia,Beer,0.42 1989,Western Pacific,Viet Nam,Spirits,0.03 1985,Eastern Mediterranean,Yemen,Wine,0 1987,Eastern Mediterranean,Sudan,Beer,0 1989,Europe,Belarus,Spirits,4.81 1985,Europe,Israel,Other,0.16 1985,Eastern Mediterranean,Somalia,Beer,0.01 1989,Eastern Mediterranean,Syrian Arab Republic,Spirits,0.11 1986,Europe,Cyprus,Beer,2.96 1989,Africa,Swaziland,Beer,0 1987,Africa,Madagascar,Spirits,0.96 1989,Europe,France,Wine,10.24 1987,Africa,Gambia,Beer,0.07 1989,Americas,United States of America,Other, 1989,Africa,Cabo Verde,Wine,1.69 1989,Americas,Trinidad and Tobago,Other,0.01 1986,Western Pacific,Vanuatu,Wine,0.64 1985,South-East Asia,Bangladesh,Spirits,0 1984,Africa,Botswana,Spirits,0.28 1987,Western Pacific,Philippines,Wine,0.01 1985,Europe,Slovakia,Spirits,4.5 1987,Americas,United States of America,Spirits,3.1 1989,Eastern Mediterranean,Saudi Arabia,Spirits,0 1989,Europe,Poland,Spirits,6.08 1985,South-East Asia,Myanmar,Beer,0.01 1989,Africa,Senegal,Beer,0.28 1986,Eastern Mediterranean,Syrian Arab Republic,Other,0 1984,Europe,Romania,Beer,2.94 1987,Americas,Honduras,Beer,1.02 1985,Eastern Mediterranean,Qatar,Spirits,1.94 1986,South-East Asia,Bhutan,Spirits,0 1987,Western Pacific,Fiji,Other, 1989,Europe,Bulgaria,Wine,3.02 1989,Europe,Slovenia,Beer,2.72 1987,Americas,Belize,Spirits,3.04 1984,Africa,Lesotho,Spirits,0.44 1985,Western Pacific,Singapore,Beer,1.01 1985,Europe,Ukraine,Other, 1986,Africa,Guinea,Beer,0.07 1987,Africa,Angola,Spirits,0.48 1987,Western Pacific,Brunei Darussalam,Wine,0.15 1987,Africa,Algeria,Beer,0.17 1985,Africa,Congo,Other,2.76 1989,Europe,Hungary,Other, 1987,Western Pacific,Vanuatu,Spirits,0.18 1985,Africa,Mauritius,Beer,1.12 1986,Western Pacific,Solomon Islands,Spirits,0.07 1985,Africa,Central African Republic,Wine,0.43 1987,Africa,Guinea,Beer,0.08 1986,South-East Asia,Thailand,Spirits,2.32 1987,Africa,Algeria,Spirits,0.01 1985,South-East Asia,Sri Lanka,Wine,0 1985,Europe,Lithuania,Wine, 1984,Africa,Mauritius,Spirits,1.74 1986,Europe,United Kingdom of Great Britain and Northern Ireland,Beer,6.73 1989,Eastern Mediterranean,Iran (Islamic Republic of),Beer,0 1985,Eastern Mediterranean,Djibouti,Beer,0.5 1987,Americas,Nicaragua,Spirits,2.75 1984,Eastern Mediterranean,Libya,Beer,0 1989,Africa,Lesotho,Spirits,0.36 1989,Africa,Gabon,Beer,6.49 1989,Africa,Comoros,Wine,0.09 1986,Americas,Dominican Republic,Beer,1.24 1987,Africa,Lesotho,Beer,0.75 1986,South-East Asia,Indonesia,Beer,0.03 1987,Africa,Congo,Wine,0.01 1984,South-East Asia,Sri Lanka,Spirits,0.25 1986,Western Pacific,Australia,Wine,3.34 1986,Europe,Norway,Spirits,1.61 1987,Africa,Democratic Republic of the Congo,Beer,0.59 1987,South-East Asia,Indonesia,Spirits,0.03 1985,Americas,Bahamas,Wine,1.9 1987,Western Pacific,China,Other,0 1984,Americas,Suriname,Other,0 1986,Americas,Bahamas,Other,0.03 1984,Africa,Lesotho,Beer,1.22 1985,Eastern Mediterranean,Morocco,Wine,0.25 1987,Europe,Malta,Beer,2.36 1989,Africa,Malawi,Spirits,0.2 1989,Europe,Italy,Spirits,1.32 1984,Europe,Belarus,Wine, 1985,Africa,Zambia,Wine,0.05 1984,Western Pacific,New Zealand,Spirits,2.3 1986,Africa,Algeria,Wine,0.1 1987,Western Pacific,Solomon Islands,Beer,0.58 1989,Europe,Denmark,Spirits,1.65 1989,Americas,Nicaragua,Spirits,1.79 1989,Americas,Canada,Wine,1.27 1986,Western Pacific,Micronesia (Federated States of),Other,0 1984,Africa,Cameroon,Wine,0.08 1984,Americas,Trinidad and Tobago,Spirits,3.82 1985,Europe,Turkey,Other,0 1989,Africa,Zambia,Wine,0 1986,Western Pacific,Samoa,Other,0 1987,Americas,Colombia,Beer,4.36 1989,Americas,Peru,Beer,1.89 1984,Americas,Jamaica,Other,0 1986,South-East Asia,Bangladesh,Wine,0 1989,Africa,Botswana,Other,1.75 1989,Eastern Mediterranean,Kuwait,Spirits,0 1989,Europe,Russian Federation,Other,0.52 1986,Eastern Mediterranean,Pakistan,Beer,0.01 1986,Eastern Mediterranean,Pakistan,Spirits,0 1989,Western Pacific,New Zealand,Other,0.03 1987,Eastern Mediterranean,United Arab Emirates,Wine,0.21 1986,Africa,Equatorial Guinea,Spirits,0 1985,Africa,Gabon,Beer,8.33 1986,Africa,Senegal,Spirits,0.02 1987,Europe,Kyrgyzstan,Wine,0.71 1984,Africa,Comoros,Other, 1989,Americas,Uruguay,Wine,3.72 1985,Americas,Argentina,Other,0 1985,Africa,Madagascar,Wine,0.19 1984,Europe,Netherlands,Other,0 1987,Eastern Mediterranean,Morocco,Other,0 1984,Eastern Mediterranean,Oman,Other,0 1989,Americas,Bolivia (Plurinational State of),Spirits,1.71 1989,Western Pacific,Fiji,Wine,0.13 1984,Americas,Colombia,Other,0 1987,Western Pacific,Kiribati,Beer,0.49 1984,South-East Asia,Bangladesh,Beer,0 1984,Western Pacific,Mongolia,Other,0 1989,Africa,Liberia,Spirits,5.16 1984,Eastern Mediterranean,Somalia,Wine,0 1987,Western Pacific,Kiribati,Spirits,0.11 1984,Africa,Senegal,Spirits,0.05 1984,South-East Asia,Bhutan,Spirits,0 1986,Eastern Mediterranean,Qatar,Spirits,1.98 1985,Africa,Uganda,Wine,0 1984,Europe,Albania,Spirits,0.9 1987,South-East Asia,Nepal,Other,0 1987,South-East Asia,Bangladesh,Beer,0 1987,Western Pacific,Malaysia,Wine,0.03 1986,Eastern Mediterranean,Tunisia,Spirits,0.19 1989,Europe,Israel,Beer,0.87 1989,Africa,Cte d‘Ivoire,Beer,0.33 1987,Europe,Latvia,Other,0 1985,Eastern Mediterranean,Pakistan,Other,0.01 1985,Western Pacific,Australia,Beer,7.73 1984,Western Pacific,Kiribati,Other,0 1987,Europe,Cyprus,Other,0 1985,Americas,Haiti,Beer,0 1987,Europe,Belarus,Other, 1985,Western Pacific,China,Spirits,1.84 1986,Europe,Kyrgyzstan,Spirits,2 1985,Europe,Portugal,Wine,10.9 1985,South-East Asia,Bangladesh,Other,0 1987,Africa,Sierra Leone,Spirits,0.02 1989,Americas,Suriname,Other,0 1985,Africa,Zambia,Beer,0.97 1986,Americas,Costa Rica,Wine,0.07 1986,Western Pacific,Lao People‘s Democratic Republic,Wine,0 1987,Western Pacific,Fiji,Beer,1.51 1986,Africa,Swaziland,Wine,0 1986,Western Pacific,Samoa,Beer,1.51 1989,Europe,Spain,Other,0 1989,Africa,South Africa,Spirits,1.8 1986,Africa,Chad,Spirits,0.01 1985,Western Pacific,Republic of Korea,Other,7 1985,Americas,Haiti,Other,0 1987,Africa,Liberia,Beer,0.46 1986,Africa,Gabon,Wine,5 1985,Western Pacific,Philippines,Beer,1.62 1987,Western Pacific,Fiji,Wine,0.11 1987,Americas,Venezuela (Bolivarian Republic of),Other, 1984,Americas,Canada,Beer,5 1986,Europe,Portugal,Beer,3 1986,Africa,Mauritania,Other,0 1985,Africa,Sao Tome and Principe,Beer,0 1984,Americas,Guyana,Other,0 1987,Western Pacific,Mongolia,Wine,0 1986,Europe,Albania,Spirits,0.57 1984,South-East Asia,Democratic People‘s Republic of Korea,Spirits,2.96 1985,Africa,Namibia,Other,0.27 1984,Europe,Slovenia,Other,0 1989,Eastern Mediterranean,Morocco,Beer,0.33 1986,Europe,Italy,Spirits,1.48 1985,Western Pacific,Micronesia (Federated States of),Beer,0 1984,Eastern Mediterranean,Qatar,Wine,0 1985,Americas,Honduras,Spirits,0.94 1984,Eastern Mediterranean,Morocco,Spirits,0.02 1987,Americas,Haiti,Spirits,5.09 1985,Europe,Poland,Other, 1987,Africa,Liberia,Spirits,4.39 1987,Eastern Mediterranean,Pakistan,Spirits,0 1984,Americas,Paraguay,Spirits,4.91 1985,Africa,Liberia,Other, 1985,Eastern Mediterranean,Bahrain,Other,0 1984,Western Pacific,Japan,Wine,0.09 1985,Africa,Kenya,Beer,1.34 1986,South-East Asia,Thailand,Other,0 1986,Africa,Mauritius,Wine,0.11 1985,Africa,Sao Tome and Principe,Other,0 1989,Americas,Venezuela (Bolivarian Republic of),Wine,0.08 1984,South-East Asia,Nepal,Wine,0 1985,Africa,Benin,Other,0 1989,Eastern Mediterranean,Egypt,Wine,0.01 1987,Africa,Malawi,Wine,0.01 1987,Eastern Mediterranean,Afghanistan,Wine,0 1984,Europe,Russian Federation,Spirits,4.77 1984,Western Pacific,Cambodia,Wine,0 1984,Americas,Peru,Wine,0.11 1984,Americas,El Salvador,Other, 1987,Europe,Ireland,Other,0.65 1986,Africa,Mozambique,Beer,0.18 1984,Africa,Zambia,Other,1.9 1987,Africa,Ethiopia,Beer,0.54 1985,Eastern Mediterranean,Libya,Spirits,0 1989,Africa,Zambia,Spirits,0.2 1985,Europe,Bulgaria,Spirits,4.08 1989,Africa,Ethiopia,Spirits,0.09 1987,Eastern Mediterranean,United Arab Emirates,Spirits,4.54 1986,Africa,Ghana,Spirits,0.02 1984,Africa,Eritrea,Wine,0 1987,Africa,Guinea,Other, 1985,Europe,Italy,Beer,1.37 1989,South-East Asia,Bhutan,Other, 1986,Europe,Denmark,Other, 1987,Western Pacific,Singapore,Other,0.06 1989,Americas,Chile,Beer,1.63 1984,Americas,Ecuador,Wine,0.02 1987,Western Pacific,Japan,Spirits,2.81 1989,Europe,Kyrgyzstan,Other,0 1987,Europe,Czech Republic,Other, 1987,Africa,Mali,Spirits,0 1989,Americas,Bolivia (Plurinational State of),Other,0 1984,Western Pacific,Cambodia,Spirits,0.3 1987,Western Pacific,Samoa,Spirits,0.01 1985,South-East Asia,Myanmar,Spirits,0.29 1989,Western Pacific,Cambodia,Other, 1985,Americas,Mexico,Wine,0.06 1985,Europe,Lithuania,Beer, 1985,Americas,Argentina,Spirits,1.45 1986,Americas,Uruguay,Wine,3.3 1986,Africa,Niger,Spirits,0.01 1985,Europe,Romania,Spirits,2.65 1985,Americas,Venezuela (Bolivarian Republic of),Wine,0.14 1985,Africa,Eritrea,Spirits,0 1987,Eastern Mediterranean,Saudi Arabia,Spirits,0 1984,Eastern Mediterranean,Iran (Islamic Republic of),Wine,0 1987,Europe,Russian Federation,Beer,1.18 1987,Africa,Guinea,Spirits,0.08 1985,Eastern Mediterranean,Syrian Arab Republic,Spirits,0.15 1986,Africa,Angola,Beer,0.9 1986,Europe,Finland,Wine,0.88 1986,Africa,Zambia,Spirits,0.02 1989,Europe,Greece,Spirits,3.56 1984,Americas,Uruguay,Wine,4.42 1987,Americas,Guatemala,Spirits,1.95 1989,Africa,Mali,Wine,0.01 1985,Western Pacific,Brunei Darussalam,Spirits,0.48 1987,Africa,Kenya,Wine,0 1987,Western Pacific,Vanuatu,Beer,0.67 1986,Eastern Mediterranean,Morocco,Beer,0.35 1989,South-East Asia,Nepal,Wine,0 1987,Africa,Democratic Republic of the Congo,Other,1.75 1985,Western Pacific,Viet Nam,Beer,0.12 1984,Western Pacific,Solomon Islands,Wine,0.04 1984,Europe,Cyprus,Other,0 1985,Western Pacific,Solomon Islands,Beer,1.01 1986,Western Pacific,Singapore,Other,0.07 1985,Western Pacific,New Zealand,Beer,7.58 1987,Europe,Slovakia,Other,0 1987,Americas,Belize,Wine,0.18 1989,Americas,Jamaica,Wine,0.06 1989,Western Pacific,Kiribati,Spirits,0.06 1989,Americas,Dominican Republic,Wine,0.04 1987,Eastern Mediterranean,Lebanon,Spirits,2.61 1985,Eastern Mediterranean,Saudi Arabia,Beer,0.25 1987,Americas,Bahamas,Spirits,7.86 1984,Europe,United Kingdom of Great Britain and Northern Ireland,Other,0 1985,Africa,Mauritius,Wine,0.05 1989,Western Pacific,Vanuatu,Beer,0.65 1984,Americas,Guyana,Wine,0 1984,Eastern Mediterranean,Pakistan,Wine,0 1987,Africa,Cte d‘Ivoire,Other,0.97 1984,Eastern Mediterranean,Djibouti,Beer,0.45 1985,Americas,Panama,Spirits,2.09 1989,Western Pacific,Solomon Islands,Spirits,0.04 1984,Africa,Mozambique,Wine,0.01 1984,Western Pacific,New Zealand,Beer,7.72 1985,Americas,Dominican Republic,Other,0 1989,Europe,Croatia,Beer,2.87 1985,Western Pacific,Papua New Guinea,Other,0 1985,Europe,Cyprus,Spirits,3.21 1987,South-East Asia,Bhutan,Wine,0 1985,Africa,Swaziland,Wine,1.03 1987,Europe,Netherlands,Beer,5.18 1984,Europe,Austria,Spirits,1.9 1985,Africa,Gabon,Other, 1987,Eastern Mediterranean,Oman,Beer,0.26 1989,Americas,Uruguay,Beer,1.45 1989,Eastern Mediterranean,Libya,Wine,0 1989,Eastern Mediterranean,Saudi Arabia,Wine,0 1985,Africa,Equatorial Guinea,Wine,0 1985,Europe,Cyprus,Other,0 1984,Eastern Mediterranean,Bahrain,Wine,0.56 1984,Americas,Bolivia (Plurinational State of),Wine,0.09 1989,Americas,Suriname,Beer,2.1 1987,South-East Asia,India,Wine,0 1987,Europe,Germany,Other, 1984,Eastern Mediterranean,Syrian Arab Republic,Spirits,0.14 1984,Americas,El Salvador,Wine,0.04 1984,Africa,Democratic Republic of the Congo,Other,1.83 1985,South-East Asia,Myanmar,Other,0 1985,Africa,Eritrea,Other,0.39 1986,Americas,Costa Rica,Other,0 1985,Africa,Congo,Spirits,0.26 1986,Europe,Germany,Beer,8.68 1984,Americas,Suriname,Beer,2.95 1987,Eastern Mediterranean,Yemen,Wine,0 1989,Americas,Costa Rica,Wine,0.1 1987,Africa,Swaziland,Spirits,1.32 1985,South-East Asia,Sri Lanka,Other,0 1985,South-East Asia,Democratic People‘s Republic of Korea,Other, 1989,Europe,Ukraine,Beer,1.65 1989,Africa,Zambia,Other,2.16 1984,Europe,Austria,Wine,5.1 1985,Americas,Cuba,Spirits,2.22 1987,Western Pacific,Solomon Islands,Spirits,0.06 1987,Europe,Lithuania,Beer, 1987,Europe,Austria,Beer,6.9 1986,Europe,Luxembourg,Wine,6.97 1985,Americas,Cuba,Other, 1985,Americas,Paraguay,Wine,0.36 1989,Europe,Denmark,Wine,2.55 1987,Americas,Belize,Beer,1.41 1986,South-East Asia,Nepal,Beer,0.01 1986,Africa,United Republic of Tanzania,Beer,0.25 1987,Americas,El Salvador,Other, 1989,Western Pacific,Vanuatu,Spirits,0.54 1984,Africa,Burkina Faso,Other,2.93 1986,Eastern Mediterranean,Yemen,Wine,0 1987,Americas,Haiti,Beer,0.01 1984,Americas,Costa Rica,Other,0.01 1989,Africa,Eritrea,Other,0.21 1987,Western Pacific,Singapore,Spirits,0.64 1986,Eastern Mediterranean,Tunisia,Beer,0.38 1986,Eastern Mediterranean,Iraq,Spirits,0.45 1987,Americas,Dominican Republic,Beer,1.32 1986,Eastern Mediterranean,Saudi Arabia,Spirits,0.01 1989,Europe,Switzerland,Beer,4.17 1985,Africa,South Africa,Wine,1.73 1985,Africa,United Republic of Tanzania,Other,7.8 1984,Africa,Chad,Wine,0.04 1986,Africa,Burundi,Spirits,0 1984,Africa,Namibia,Wine,0 1984,Europe,Portugal,Beer,2.46 1986,Africa,Liberia,Spirits,3.82 1986,Americas,Dominican Republic,Wine,0.06 1985,Americas,Colombia,Other,0 1989,Americas,Dominican Republic,Beer,1.54 1984,Europe,Netherlands,Beer,5.21 1985,Africa,Seychelles,Beer,2.21 1986,Africa,Angola,Other,0 1986,Africa,Central African Republic,Wine,0.36 1986,Americas,Saint Lucia,Spirits,6.62 1989,Americas,Mexico,Spirits,1.48 1986,Western Pacific,Malaysia,Other, 1986,South-East Asia,Democratic People‘s Republic of Korea,Other, 1985,Americas,Canada,Beer,4.94 1989,Europe,Portugal,Spirits,0.92 1989,Africa,Benin,Wine,0.09 1989,Europe,Ukraine,Spirits,2.68 1989,Americas,El Salvador,Beer,0.81 1986,Europe,Czech Republic,Other, 1984,Africa,Burkina Faso,Spirits,0.03 1986,South-East Asia,Thailand,Wine,0 1986,Europe,Israel,Spirits,0.72 1986,Europe,Israel,Wine,0.61 1986,Africa,Botswana,Spirits,0.23 1986,Americas,Honduras,Wine,0.02 1989,Western Pacific,Philippines,Wine,0 1986,Africa,Rwanda,Other,5.95 1985,Europe,Kyrgyzstan,Other,0 1984,South-East Asia,India,Other,0 1986,Europe,France,Other,0.25 1984,Western Pacific,Australia,Other,0 1987,Americas,Cuba,Spirits,2.39 1989,Europe,Netherlands,Spirits,2.35 1985,Europe,Russian Federation,Wine,1.65 1986,Africa,Mauritius,Other,0 1987,Americas,Argentina,Wine,10.1 1984,Africa,Lesotho,Other,1.49 1987,Americas,Canada,Wine,1.3 1984,Europe,Russian Federation,Beer,1.55 1986,Africa,Niger,Other,0 1989,Africa,Mozambique,Spirits,0.17 1987,Eastern Mediterranean,Yemen,Other, 1989,Africa,Angola,Wine,0.82 1989,Africa,Togo,Other,0.02 1987,South-East Asia,Thailand,Spirits,2.45 1987,Americas,Bolivia (Plurinational State of),Wine,0.1 1985,Europe,Malta,Wine,1.17 1989,South-East Asia,Democratic People‘s Republic of Korea,Other, 1986,Americas,Bolivia (Plurinational State of),Wine,0.09 1985,Americas,Venezuela (Bolivarian Republic of),Beer,4.04 1986,Africa,Guinea,Other, 1985,Africa,Zimbabwe,Wine,0.04 1987,Americas,Peru,Spirits,3.45 1987,Eastern Mediterranean,Egypt,Other, 1984,Europe,Poland,Beer,1.78 1986,Europe,United Kingdom of Great Britain and Northern Ireland,Other,0 1987,Europe,Italy,Other, 1987,Americas,Venezuela (Bolivarian Republic of),Wine,0.14 1989,Europe,Portugal,Other,0.72 1986,Europe,Malta,Spirits,2.03 1987,South-East Asia,Sri Lanka,Other,0 1989,Americas,Cuba,Spirits,2.45 1989,Europe,Netherlands,Wine,2.45 1987,Africa,Botswana,Other,1.66 1989,South-East Asia,Nepal,Spirits,0 1989,Africa,Togo,Spirits,0.29 1989,Western Pacific,Singapore,Spirits,0.51 1987,Americas,Suriname,Spirits,1.12 1989,Europe,Slovenia,Spirits,2.69 1989,Europe,Lithuania,Other, 1986,Europe,Spain,Wine,6.65 1987,Americas,Trinidad and Tobago,Beer,2.03 1986,Europe,Greece,Beer,2.2 1989,Americas,Peru,Other,0 1989,Americas,Nicaragua,Beer,0.7 1984,Africa,Botswana,Beer,1.77 1986,Americas,United States of America,Beer,5.07 1986,Eastern Mediterranean,Morocco,Spirits,0.06 1987,Europe,Turkey,Spirits,0.48 1985,Western Pacific,Philippines,Wine,0 1989,Americas,Ecuador,Beer,1.59 1987,Africa,Burundi,Spirits,0 1984,Europe,Latvia,Wine,2.59 1984,Europe,Malta,Wine,1.26 1986,Americas,Uruguay,Beer,1.38 1984,Africa,Mali,Beer,0.01 1986,Western Pacific,Mongolia,Wine,0 1984,Europe,Bulgaria,Wine,3.28 1984,South-East Asia,Democratic People‘s Republic of Korea,Other, 1985,Western Pacific,Malaysia,Wine,0.02 1989,Africa,Swaziland,Wine,0 1989,Europe,Sweden,Spirits,2.25 1987,Eastern Mediterranean,United Arab Emirates,Other,0 1985,Western Pacific,Australia,Other,0 1986,Africa,Seychelles,Spirits,0.62 1985,Eastern Mediterranean,Qatar,Beer,0.12 1986,Africa,Swaziland,Spirits,1.32 1985,Africa,Seychelles,Spirits,0.63 1985,Western Pacific,Kiribati,Wine,0.04 1984,Africa,Eritrea,Beer,0.16 1989,Western Pacific,Singapore,Other,0.06 1985,Africa,Guinea-Bissau,Spirits,0.79 1989,Western Pacific,Malaysia,Spirits,0.16 1985,Africa,United Republic of Tanzania,Wine,0 1986,South-East Asia,Democratic People‘s Republic of Korea,Wine,0 1984,Europe,Italy,Wine,11.2 1989,Europe,Bulgaria,Other,0 1989,Africa,Niger,Beer,0.08 1984,Africa,Liberia,Other, 1989,Americas,Trinidad and Tobago,Spirits,2.32 1985,Africa,Liberia,Wine,0.02 1984,Americas,Ecuador,Other,0 1986,Africa,Guinea-Bissau,Wine,0.04 1986,Americas,Venezuela (Bolivarian Republic of),Spirits,3.7 1985,Americas,Jamaica,Spirits,1 1985,Africa,Togo,Beer,2.07 1989,Western Pacific,Cambodia,Beer,0 1989,Africa,Democratic Republic of the Congo,Other,1.66 1986,Europe,Iceland,Wine,1.03 1984,Europe,Finland,Wine,0.85 1984,Africa,Zimbabwe,Wine,0.05 1985,Africa,Comoros,Wine,0.05 1984,Europe,Iceland,Beer,1.17 1984,Africa,South Africa,Other,1.84 1989,Western Pacific,Australia,Other,0 1985,Eastern Mediterranean,Bahrain,Beer,1.26 1986,Europe,Netherlands,Spirits,2.72 1987,Americas,Dominican Republic,Wine,0.03 1985,Eastern Mediterranean,Somalia,Spirits,0 1986,Africa,Benin,Wine,0.12 1989,Europe,Finland,Spirits,1.8 1987,Americas,Mexico,Beer,3.05 1985,Western Pacific,China,Wine,0.02 1986,Eastern Mediterranean,Kuwait,Other, 1984,Americas,United States of America,Other, 1989,Americas,Peru,Wine,0.11 1989,Europe,Cyprus,Spirits,3.49 1986,South-East Asia,Bhutan,Wine,0 1989,Africa,Mali,Other,0.58 1989,Africa,Burkina Faso,Wine,0.01 1986,Western Pacific,China,Beer,0.24 1984,Americas,Belize,Wine,0.15 1986,Americas,Ecuador,Spirits,1.08 1986,Americas,Chile,Wine,5.14 1985,Europe,Germany,Wine,3.66 1984,Africa,Niger,Beer,0.11 1986,Europe,Austria,Spirits,1.8 1985,Americas,Antigua and Barbuda,Beer,1.69 1986,Europe,Cyprus,Other,0 1986,Africa,Cameroon,Wine,0.08 1984,Eastern Mediterranean,Sudan,Other,0 1986,Western Pacific,Mongolia,Spirits,2.47 1985,Americas,Ecuador,Spirits,1.05 1985,Eastern Mediterranean,Djibouti,Wine,0.52 1987,Africa,Kenya,Other,0.59 1989,Eastern Mediterranean,Iraq,Other,0 1984,Americas,Nicaragua,Spirits,2.32 1984,Europe,Portugal,Wine,13.5 1984,Africa,Algeria,Other,0 1986,Europe,Norway,Wine,0.83 1987,Africa,Mauritania,Beer,0 1985,Africa,Sierra Leone,Wine,0.01 1984,Western Pacific,Cambodia,Beer,0 1989,Americas,Antigua and Barbuda,Beer,1.83 1984,Americas,Dominican Republic,Spirits,2.53 1984,Eastern Mediterranean,United Arab Emirates,Other,0 1987,Americas,Panama,Beer,3.19 1985,Americas,Guatemala,Other,0 1989,Eastern Mediterranean,Syrian Arab Republic,Beer,0.07 1984,Africa,Rwanda,Wine,0.01 1987,South-East Asia,India,Beer,0.01 1987,Americas,El Salvador,Beer,0.9 1987,Africa,Cameroon,Other,3.97 1986,Africa,Central African Republic,Other,1.14 1989,Americas,Antigua and Barbuda,Spirits,1.56 1989,Americas,Ecuador,Spirits,0.92 1984,Africa,Botswana,Wine,0.95 1989,Eastern Mediterranean,Pakistan,Spirits,0 1985,Eastern Mediterranean,Iran (Islamic Republic of),Wine,0 1984,Americas,Belize,Beer,1.65 1986,Africa,Democratic Republic of the Congo,Wine,0 1984,Western Pacific,Brunei Darussalam,Wine,0.94 1984,Africa,Eritrea,Other,0.39 1986,Eastern Mediterranean,Afghanistan,Spirits,0 1987,Europe,Hungary,Wine,3.32 1989,Americas,Colombia,Other,0 1989,Americas,Saint Lucia,Beer,2.36 1989,Europe,Hungary,Wine,3.44 1986,Eastern Mediterranean,Iraq,Other,0 1989,Europe,France,Other,0.27 1984,Americas,Venezuela (Bolivarian Republic of),Beer,5.27 1984,Europe,Germany,Wine,3.7 1989,South-East Asia,Democratic People‘s Republic of Korea,Spirits,3.34 1986,Eastern Mediterranean,Somalia,Spirits,0 1987,Africa,Mauritius,Beer,1.57 1987,Eastern Mediterranean,Qatar,Spirits,1.3 1989,Americas,Saint Lucia,Other,0.09 1989,Western Pacific,Malaysia,Beer,0.52 1989,Americas,Brazil,Beer,2.89 1987,Americas,Uruguay,Beer,1.41 1985,Western Pacific,Micronesia (Federated States of),Other,0 1987,Americas,Trinidad and Tobago,Other,0 1984,Africa,Liberia,Spirits,2.96 1984,Europe,Netherlands,Spirits,2.95 1987,Western Pacific,Papua New Guinea,Wine,0.04 1989,Eastern Mediterranean,Morocco,Other,0 1989,Eastern Mediterranean,Bahrain,Other,0 1985,Western Pacific,Brunei Darussalam,Wine,0.51 1984,Western Pacific,Lao People‘s Democratic Republic,Other, 1989,Africa,Algeria,Beer,0.16 1989,Europe,Israel,Other,0 1984,Africa,Madagascar,Spirits,0.8 1989,Europe,Malta,Beer,3.08 1984,Africa,Zimbabwe,Spirits,5.68 1985,Africa,Guinea,Spirits,0 1986,Africa,Malawi,Wine,0 1986,Eastern Mediterranean,Yemen,Spirits,0.06 1985,Eastern Mediterranean,Sudan,Wine,0 1986,Africa,Kenya,Spirits,0.85 1986,Africa,South Africa,Spirits,2.06 1989,Europe,Greece,Other,0.07 1985,Africa,Cabo Verde,Spirits,0.46 1987,Western Pacific,Brunei Darussalam,Beer,2.5 1986,Africa,Namibia,Spirits,0 1986,Eastern Mediterranean,Egypt,Other, 1989,Western Pacific,Lao People‘s Democratic Republic,Wine,1.13 1984,South-East Asia,Myanmar,Spirits,0.28 1984,Africa,Guinea-Bissau,Spirits,0.8 1987,Americas,United States of America,Other, 1989,Europe,Croatia,Spirits,2.95 1989,Europe,Turkey,Wine,0.07 1984,Western Pacific,Philippines,Spirits,2.83 1987,Americas,Guatemala,Beer,0.82 1987,Africa,Central African Republic,Other,1.15 1984,Eastern Mediterranean,Egypt,Beer,0.06 1984,Africa,Sierra Leone,Other,4.44 1986,Western Pacific,Papua New Guinea,Beer,1.15 1984,Western Pacific,Mongolia,Wine,0 1984,Africa,Sao Tome and Principe,Beer,0 1984,Eastern Mediterranean,Tunisia,Beer,0.47 1984,Americas,Venezuela (Bolivarian Republic of),Wine,0.12 1989,South-East Asia,Bhutan,Beer,0.31 1984,Eastern Mediterranean,United Arab Emirates,Wine,0.15 1987,Africa,Malawi,Beer,0.08 1987,Europe,Lithuania,Wine, 1984,Western Pacific,Japan,Spirits,3.03 1987,Europe,Latvia,Wine,1.05 1987,Africa,Burkina Faso,Other,3.67 1986,Western Pacific,Brunei Darussalam,Wine,0.1 1989,Africa,Ghana,Spirits,0.02 1986,Americas,Mexico,Beer,2.97 1984,Europe,Sweden,Wine,1.55 1985,Americas,Dominican Republic,Spirits,2.28 1987,Europe,Netherlands,Other,0 1986,Africa,Cameroon,Beer,2.45 1989,Africa,Mauritania,Wine,0 1986,Eastern Mediterranean,Pakistan,Wine,0 1985,Americas,Trinidad and Tobago,Wine,0.16 1986,Africa,Congo,Spirits,0.32 1987,Americas,Brazil,Wine,0.35 1984,Western Pacific,Singapore,Beer,1.02 1987,Americas,Guyana,Wine,0 1986,Africa,Cabo Verde,Other, 1985,Europe,Malta,Other,0.03 1986,Europe,Russian Federation,Spirits,2.46 1989,Africa,Cameroon,Other,4.08 1986,Europe,Portugal,Other,0.93 1984,Europe,Romania,Wine,4.11 1986,Americas,El Salvador,Other, 1989,Europe,Czech Republic,Wine,1.95 1986,Africa,Zimbabwe,Other,1.39 1989,Americas,Bahamas,Beer,3.33 1989,Africa,Gabon,Spirits,0.42 1986,South-East Asia,Sri Lanka,Beer,0.04 1989,Eastern Mediterranean,Djibouti,Wine,0.27 1984,Eastern Mediterranean,Yemen,Beer,0.15 1984,South-East Asia,Nepal,Beer,0.02 1987,Western Pacific,Samoa,Beer,3.11 1987,Africa,Sao Tome and Principe,Other,0 1986,Eastern Mediterranean,Egypt,Spirits,0.31 1986,Western Pacific,Lao People‘s Democratic Republic,Other, 1985,Africa,Malawi,Beer,0.19 1987,Africa,Cameroon,Spirits,0.02 1989,Africa,Equatorial Guinea,Spirits,0 1989,Eastern Mediterranean,Oman,Other,0 1986,Africa,Burkina Faso,Wine,0.02 1985,Eastern Mediterranean,Pakistan,Beer,0.01 1987,Eastern Mediterranean,Yemen,Beer,0.11 1987,Americas,Uruguay,Wine,3.85 1989,Africa,Algeria,Spirits,0.01 1985,Africa,Eritrea,Beer,0.15 1984,Western Pacific,Philippines,Beer,1.32 1989,Eastern Mediterranean,Kuwait,Beer,0 1985,Africa,Cameroon,Wine,0.09 1987,Americas,Belize,Other,0.02 1985,Western Pacific,Mongolia,Beer,0.36 1989,Africa,Niger,Spirits,0.01 1985,Americas,Guyana,Spirits,4.73 1986,Africa,Guinea-Bissau,Other,1.17 1985,Africa,Mauritania,Beer,0.01 1987,Western Pacific,Solomon Islands,Other,0 1985,Eastern Mediterranean,Yemen,Beer,0.22 1986,Africa,Rwanda,Beer,0.9 1986,Africa,Nigeria,Spirits,0 1984,Africa,Ethiopia,Spirits,0 1985,Africa,Sao Tome and Principe,Spirits,0.01 1986,Europe,Denmark,Wine,2.66 1984,Western Pacific,Cambodia,Other, 1986,Eastern Mediterranean,Sudan,Other,0 1984,Africa,Uganda,Beer,0.1 1987,Africa,Equatorial Guinea,Beer,0.33 1984,Africa,Nigeria,Wine,0 1985,Eastern Mediterranean,Kuwait,Spirits,0 1984,Western Pacific,Viet Nam,Beer,0.13 1984,Americas,Saint Lucia,Other,0.1 1986,Africa,Eritrea,Other,0.22 1987,Europe,Netherlands,Wine,2.48 1984,Europe,Lithuania,Spirits, 1986,Europe,Germany,Other, 1987,Africa,Malawi,Spirits,0.28 1985,Americas,El Salvador,Other, 1987,Eastern Mediterranean,Syrian Arab Republic,Beer,0.07 1987,Africa,Rwanda,Spirits,0.01 1985,Americas,Nicaragua,Beer,0.74 1984,Africa,United Republic of Tanzania,Other,6.14 1984,Western Pacific,Samoa,Beer,1.56 1985,Europe,Germany,Spirits,2.82 1989,Africa,Comoros,Beer,0.01 1986,Western Pacific,Australia,Beer,7.39 1985,Western Pacific,Fiji,Spirits,0.04 1985,Western Pacific,Philippines,Other,0.12 1985,Eastern Mediterranean,Lebanon,Other,0 1984,Europe,Turkey,Wine,0.07 1986,Africa,Congo,Other,2.75 1987,Eastern Mediterranean,Saudi Arabia,Beer,0.21 1989,Western Pacific,Micronesia (Federated States of),Spirits,0 1987,Americas,Guatemala,Wine,0.01 1986,Africa,Namibia,Other,0.26 1986,Europe,Russian Federation,Other,0.88 1987,Eastern Mediterranean,United Arab Emirates,Beer,0.61 1987,Eastern Mediterranean,Jordan,Spirits,0.15 1985,Europe,Kyrgyzstan,Spirits,4.38 1985,Americas,Peru,Wine,0.11 1986,Europe,Ukraine,Beer,1.34 1987,Western Pacific,China,Spirits,2.82 1989,Africa,Burundi,Wine,0.01 1984,Americas,Chile,Beer,1.09 1984,Eastern Mediterranean,Egypt,Wine,0.01 1984,Europe,Spain,Beer,3.87 1987,Africa,Eritrea,Spirits,0 1985,Africa,Central African Republic,Beer,1.21 1984,Eastern Mediterranean,Saudi Arabia,Other,0 1984,Europe,Belgium,Wine,3.11 1989,South-East Asia,Myanmar,Wine,0 1984,Americas,United States of America,Wine,1.4 1987,Africa,Sao Tome and Principe,Wine,1.89 1987,Africa,Chad,Wine,0.02 1987,Africa,Nigeria,Spirits,0.01 1985,Africa,Cabo Verde,Wine,1.39 1989,Africa,Cabo Verde,Spirits,0.56 1987,Europe,Bulgaria,Beer,4.2 1987,Europe,Kyrgyzstan,Other,0 1985,Africa,Gambia,Beer,0.06 1989,Americas,Guyana,Wine,0 1986,Western Pacific,Viet Nam,Other, 1987,Africa,Cte d‘Ivoire,Beer,0.34 1985,Americas,Honduras,Beer,0.94 1984,Western Pacific,China,Spirits,2.19 1987,Europe,Czech Republic,Beer,6.93 1987,Africa,Mauritius,Spirits,1.72 1984,Europe,United Kingdom of Great Britain and Northern Ireland,Spirits,2.01 1989,Eastern Mediterranean,Qatar,Beer,0.09 1987,Africa,South Africa,Wine,1.69 1985,Europe,Portugal,Beer,2.49 1985,Americas,Saint Lucia,Other,0.1 1986,Africa,Mauritania,Beer,0 1985,Europe,Portugal,Other,1.08 1985,South-East Asia,Nepal,Beer,0.01 1987,Eastern Mediterranean,Somalia,Beer,0.01 1987,Western Pacific,Mongolia,Beer,0.19 1985,Europe,Spain,Wine,6.86 1986,Europe,Spain,Beer,3.99 1984,Europe,Netherlands,Wine,2.6 1987,Africa,Niger,Other,0 1984,Africa,United Republic of Tanzania,Spirits,0.14 1987,Americas,Peru,Wine,0.11 1984,South-East Asia,Bangladesh,Wine,0 1985,Europe,Israel,Spirits,0.79 1987,South-East Asia,Indonesia,Beer,0.03 1984,Africa,Malawi,Wine,0.01 1984,Europe,Latvia,Beer,2.01 1986,Africa,Burundi,Beer,2.96 1987,Eastern Mediterranean,Sudan,Spirits,0.25 1987,Americas,Mexico,Other,0.08 1987,Eastern Mediterranean,Saudi Arabia,Wine,0 1984,Africa,Equatorial Guinea,Other, 1987,Americas,Honduras,Other, 1985,Eastern Mediterranean,Oman,Other,0 1984,Europe,Romania,Other, 1984,Western Pacific,Kiribati,Wine,0.04 1984,Eastern Mediterranean,Afghanistan,Beer,0 1984,Western Pacific,Vanuatu,Other, 1985,Europe,Belarus,Beer, 1985,Europe,Latvia,Spirits,6.55 1987,Africa,United Republic of Tanzania,Wine,0 1986,South-East Asia,Indonesia,Spirits,0.04 1986,Eastern Mediterranean,Libya,Other,0 1987,Africa,Cabo Verde,Other, 1989,Africa,Rwanda,Wine,0.01 1989,Africa,Botswana,Wine,0.16 1987,Eastern Mediterranean,Afghanistan,Spirits,0 1984,Western Pacific,Malaysia,Beer,0.5 1987,Europe,Denmark,Beer,7.17 1987,Americas,Colombia,Spirits,2.32 1989,Western Pacific,Mongolia,Beer,0.24 1984,Africa,Democratic Republic of the Congo,Beer,0.43 1984,Europe,Greece,Other,0.07 1987,Western Pacific,Mongolia,Spirits,1.91 1984,Americas,United States of America,Beer,5.22 1986,Africa,Cte d‘Ivoire,Beer,0.36 1984,Americas,Saint Kitts and Nevis,Wine,0.23 1986,Eastern Mediterranean,Syrian Arab Republic,Spirits,0.11 1989,Africa,Comoros,Other, 1984,Africa,Mauritania,Other,0 1987,Africa,Sao Tome and Principe,Beer,0 1984,Europe,Turkey,Spirits,0.49 1986,Africa,Lesotho,Other,1.05 1987,South-East Asia,Bangladesh,Spirits,0 1989,South-East Asia,Myanmar,Beer,0.02 1989,Africa,Zimbabwe,Other,1.51 1989,Europe,Spain,Spirits,3.5 1987,Africa,Botswana,Spirits,0.18 1986,Americas,Panama,Spirits,1.97 1986,South-East Asia,Myanmar,Beer,0.01 1985,South-East Asia,Nepal,Other,0 1984,Western Pacific,Solomon Islands,Beer,0.98 1987,Americas,Venezuela (Bolivarian Republic of),Spirits,3.88 1986,Europe,Turkey,Other,0 1986,Western Pacific,Philippines,Other,0.08 1986,Europe,Hungary,Other, 1989,Europe,Latvia,Other,0 1984,Eastern Mediterranean,Qatar,Spirits,2.04 1984,Europe,Czech Republic,Wine,2.24 1986,Eastern Mediterranean,Somalia,Other,0 1989,Americas,Venezuela (Bolivarian Republic of),Spirits,3.55 1987,Africa,Namibia,Beer,0 1986,Europe,Iceland,Other,0.01 1987,Western Pacific,Viet Nam,Other, 1984,Africa,Sierra Leone,Spirits,0.03 1985,Europe,Norway,Spirits,1.77 1984,Europe,Belarus,Other, 1987,Africa,South Africa,Other,1.69 1985,Eastern Mediterranean,Sudan,Spirits,0.25 1987,Europe,Finland,Spirits,1.85 1987,Western Pacific,Malaysia,Beer,0.45 1986,Americas,Costa Rica,Beer,0.85 1985,Americas,Argentina,Wine,10.45 1989,Africa,Kenya,Wine,0 1985,Africa,Sierra Leone,Spirits,0.03 1987,Europe,Switzerland,Spirits,2.41 1987,Africa,Malawi,Other,0.75 1989,Americas,Bahamas,Wine,1.5 1985,Africa,Malawi,Spirits,0.31
import numpy as np world_alcohol = np.genfromtxt("world_alcohol.txt", delimiter=",",dtype=str) print(world_alcohol) print(type(world_alcohol))
结果:
[[‘Year‘ ‘WHO region‘ ‘Country‘ ‘Beverage Types‘ ‘Display Value‘] [‘1986‘ ‘Western Pacific‘ ‘Viet Nam‘ ‘Wine‘ ‘0‘] [‘1986‘ ‘Americas‘ ‘Uruguay‘ ‘Other‘ ‘0.5‘] ... [‘1987‘ ‘Africa‘ ‘Malawi‘ ‘Other‘ ‘0.75‘] [‘1989‘ ‘Americas‘ ‘Bahamas‘ ‘Wine‘ ‘1.5‘] [‘1985‘ ‘Africa‘ ‘Malawi‘ ‘Spirits‘ ‘0.31‘]] <class ‘numpy.ndarray‘>
import numpy as np #The numpy.array() function can take a list or list of lists as input. When we input a list, we get a one-dimensional array as a result: vector = np.array([5, 10, 15, 20]) #When we input a list of lists, we get a matrix as a result: matrix = np.array([[5, 10, 15], [20, 25, 30], [35, 40, 45]]) print (vector) print (matrix)
结果:
[ 5 10 15 20] [[ 5 10 15] [20 25 30] [35 40 45]]
#We can use the ndarray.shape property to figure out how many elements are in the array vector = np.array([1, 2, 3, 4]) print(vector.shape) #For matrices, the shape property contains a tuple with 2 elements. matrix = np.array([[5, 10, 15], [20, 25, 30]]) print(matrix.shape)
结果:
(4,)
(2, 3)
#Each value in a NumPy array has to have the same data type重要 #NumPy will automatically figure out an appropriate data type when reading in data or converting lists to arrays. #You can check the data type of a NumPy array using the dtype property. numbers = np.array([1, 2, 3, 4])#numpy.array中的数据必须是同一种类型的,list则是多种类型皆可以 numbers.dtype#dtype(‘int32‘)
import numpy as np world_alcohol = np.genfromtxt("world_alcohol.txt", delimiter=",") #When NumPy can‘t convert a value to a numeric data type like float or integer, it uses a special nan value that stands for Not a Number #nan is the missing data #1.98600000e+03 is actually 1.986 * 10 ^ 3 world_alcohol
结果:
array([[ nan, nan, nan, nan, nan], [ 1.98600000e+03, nan, nan, nan, 0.00000000e+00], [ 1.98600000e+03, nan, nan, nan, 5.00000000e-01], ..., [ 1.98700000e+03, nan, nan, nan, 7.50000000e-01], [ 1.98900000e+03, nan, nan, nan, 1.50000000e+00], [ 1.98500000e+03, nan, nan, nan, 3.10000000e-01]])
import numpy as np world_alcohol = np.genfromtxt("world_alcohol.txt", delimiter=",", dtype="U75", skip_header=1)#skip_header=1指的是从头跳过1行 print(world_alcohol)
结果:
[[‘1986‘ ‘Americas‘ ‘Uruguay‘ ‘Other‘ ‘0.5‘] [‘1985‘ ‘Africa‘ "Cte d‘Ivoire" ‘Wine‘ ‘1.62‘] [‘1986‘ ‘Americas‘ ‘Colombia‘ ‘Beer‘ ‘4.27‘] ... [‘1987‘ ‘Africa‘ ‘Malawi‘ ‘Other‘ ‘0.75‘] [‘1989‘ ‘Americas‘ ‘Bahamas‘ ‘Wine‘ ‘1.5‘] [‘1985‘ ‘Africa‘ ‘Malawi‘ ‘Spirits‘ ‘0.31‘]] #表头被跳过了
uruguay_other_1986 = world_alcohol[1,4] third_country = world_alcohol[2,2] print(uruguay_other_1986)#0.5 print(third_country)#Cte d‘Ivoire
vector = np.array([5, 10, 15, 20]) print(vector[0:3]) #[ 5 10 15]
matrix = np.array([ [5, 10, 15], [20, 25, 30], [35, 40, 45] ]) print(matrix[:,1])#[10 25 40]
matrix = np.array([ [5, 10, 15], [20, 25, 30], [35, 40, 45] ]) print(matrix[:,0:2])
结果:
[[ 5 10] [20 25] [35 40]]
matrix = np.array([ [5, 10, 15], [20, 25, 30], [35, 40, 45] ]) print(matrix[1:3,0:2])
结果:
[[20 25]
[35 40]]
import numpy #it will compare the second value to each element in the vector # If the values are equal, the Python interpreter returns True; otherwise, it returns False vector = numpy.array([5, 10, 15, 20]) vector == 10#array([False, True, False, False], dtype=bool)
matrix = numpy.array([ [5, 10, 15], [20, 25, 30], [35, 40, 45] ]) matrix == 25
结果:
array([[False, False, False],
[False, True, False],
[False, False, False]], dtype=bool)
#Compares vector to the value 10, which generates a new Boolean vector [False, True, False, False]. It assigns this result to equal_to_ten vector = numpy.array([5, 10, 15, 20]) equal_to_ten = (vector == 10) print (equal_to_ten)#[False True False False] print(vector[equal_to_ten])#[10]
matrix = numpy.array([ [5, 10, 15], [20, 25, 30], [35, 40, 45] ]) second_column_25 = (matrix[:,1] == 25) print(second_column_25 )#[False True False] print(matrix[second_column_25, :])#[[20 25 30]]
#We can also perform comparisons with multiple conditions vector = numpy.array([5, 10, 15, 20]) equal_to_ten_and_five = (vector == 10) & (vector == 5) print(equal_to_ten_and_five)#[False False False False]
vector = numpy.array([5, 10, 15, 20]) equal_to_ten_or_five = (vector == 10) | (vector == 5) print(equal_to_ten_or_five)#[ True True False False]
vector = numpy.array([5, 10, 15, 20]) equal_to_ten_or_five = (vector == 10) | (vector == 5) vector[equal_to_ten_or_five] = 50 print(vector)#[50 50 15 20]
matrix = numpy.array([ [5, 10, 15], [20, 25, 30], [35, 40, 45] ]) second_column_25 = matrix[:,1] == 25 print(second_column_25) matrix[second_column_25, 1] = 10 print(matrix)
结果:
[False True False] [[ 5 10 15] [20 10 30] [35 40 45]]
#We can convert the data type of an array with the ndarray.astype() method. vector = numpy.array(["1", "2", "3"]) print(vector.dtype) print(vector) vector = vector.astype(float)#转换值类型 print(vector.dtype) print(vector)
结果:
<U1 [‘1‘ ‘2‘ ‘3‘] float64 [1. 2. 3.]
vector = numpy.array([5, 10, 15, 20]) vector.sum()#50
# The axis dictates which dimension we perform the operation on #1 means that we want to perform the operation on each row, and 0 means on each column matrix = numpy.array([ [5, 10, 15], [20, 25, 30], [35, 40, 45] ]) matrix.sum(axis=1)#array([ 30, 75, 120])
matrix = numpy.array([ [5, 10, 15], [20, 25, 30], [35, 40, 45] ]) matrix.sum(axis=0)#array([60, 75, 90])
import numpy #replace nan value with 0 world_alcohol = numpy.genfromtxt("world_alcohol.txt", delimiter=",") print(world_alcohol) is_value_empty = numpy.isnan(world_alcohol[:,4]) print(is_value_empty) world_alcohol[is_value_empty, 4] = ‘0‘ alcohol_consumption = world_alcohol[:,4] print(alcohol_consumption.dtype) alcohol_consumption = alcohol_consumption.astype(int) print(alcohol_consumption) total_alcohol = alcohol_consumption.sum() average_alcohol = alcohol_consumption.mean() print(total_alcohol) print(average_alcohol)
结果:
[[ nan nan nan nan nan] [1.986e+03 nan nan nan 0.000e+00] [1.986e+03 nan nan nan 5.000e-01] ... [1.987e+03 nan nan nan 7.500e-01] [1.989e+03 nan nan nan 1.500e+00] [1.985e+03 nan nan nan 3.100e-01]] [ True False False False False False False False False False False False False False False False False False False False False False False False False True False False False False True False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False True False False False False False False False True False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False True True False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False True False False False False False True False False False False False True False False False False False False False False True False False False False False False False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False True False False False True False False False False False False False False False False False False False False False True False False False False False False False False False False False True False True True False False False False False True False False False False False True False True False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False False True False False False False False False False False False False False False False True False False False False False True False False True False False False False False True False False False False False False False False False False False False False False False False False False False False False False False False False False False False True True False False False False False True False False False False False False False False False False False False False False False False False False False False False False True False False False False False True False False True False False True False False True False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False False False False False False False False True True False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False True False False False True False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False True False False False False False True False False False False False False False False False False False True False False False False False False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False True True False True False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False False False False False False False False False False False False False False False True True False True False False True True False False False False True False False False False False False False False False False False False False False True False False False False False False False False False False False False False False False False True False False False False False False False True False False True False False False False False False False False False False False False] float64 [ 0 0 0 1 4 1 0 0 0 1 6 0 0 0 0 0 0 0 2 1 1 0 4 2 0 0 0 1 2 0 0 4 0 1 0 0 2 0 3 0 0 1 6 3 0 0 0 2 0 0 1 0 3 0 0 1 0 0 5 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 2 0 0 0 0 2 0 2 2 0 0 0 1 0 0 0 0 4 0 0 3 0 7 0 0 0 1 0 0 0 0 0 0 1 0 6 1 2 0 2 2 7 0 1 0 1 0 0 0 3 7 4 3 1 1 0 3 1 2 7 2 0 0 0 0 0 0 0 1 7 0 0 3 0 0 0 3 2 0 4 7 1 0 0 0 0 2 2 8 0 0 0 0 1 0 0 0 1 0 3 3 3 3 2 3 0 0 0 2 0 0 0 1 0 0 0 0 4 0 0 0 2 0 0 10 0 0 1 0 0 0 0 0 4 3 0 6 0 0 0 2 1 1 0 0 3 2 3 0 1 0 0 0 0 0 2 0 0 1 0 0 0 2 0 0 0 1 6 0 0 2 0 0 6 0 1 0 0 0 0 3 1 0 0 1 0 0 0 1 0 2 0 1 0 0 2 0 0 1 1 1 0 0 3 0 0 0 4 1 0 0 1 0 0 0 0 0 0 0 8 0 0 0 3 0 0 0 0 0 1 0 0 0 0 0 5 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 1 2 10 0 0 0 0 0 0 1 0 1 0 1 0 7 0 0 5 1 0 0 5 3 0 0 0 0 0 2 0 0 0 1 0 0 0 0 5 0 4 0 4 0 0 0 1 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 1 0 0 0 4 0 4 0 0 0 1 0 0 0 1 0 2 0 0 0 0 0 0 0 0 0 0 1 3 0 2 0 0 0 0 1 0 0 0 0 0 3 4 1 0 0 0 0 0 0 1 0 0 0 1 0 7 0 0 0 0 0 2 0 7 0 0 0 0 0 0 0 2 0 0 7 0 2 0 3 0 1 5 1 0 0 1 0 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 8 2 0 0 1 0 0 1 2 5 2 0 0 6 6 0 0 2 1 0 0 0 0 2 0 0 0 0 0 0 0 1 0 4 1 7 0 0 0 2 3 0 0 1 5 2 0 0 6 1 0 0 4 0 0 2 0 0 0 0 0 0 0 0 0 5 0 0 0 0 2 2 1 0 10 1 1 1 0 0 0 0 0 2 0 1 0 0 4 0 0 3 0 1 0 0 0 0 2 0 2 2 1 0 0 0 1 2 0 6 2 2 0 0 1 5 0 0 0 1 0 2 1 1 0 0 3 0 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 11 0 0 0 2 0 0 0 3 1 2 0 1 1 0 0 0 1 1 0 1 2 0 0 0 1 3 0 0 0 0 3 0 0 0 0 0 1 5 3 0 1 1 0 0 0 2 1 0 0 0 2 13 0 0 0 0 0 1 2 0 3 0 0 0 0 0 3 1 1 0 0 0 0 1 0 0 0 0 3 0 2 3 0 0 5 3 3 0 1 1 0 0 2 1 0 0 2 2 0 0 0 0 0 0 0 0 3 5 0 0 0 0 0 2 0 0 2 0 0 1 0 0 0 2 0 2 0 1 0 4 1 0 0 0 0 0 0 0 0 3 1 3 0 0 2 1 2 0 2 0 0 0 0 0 1 0 0 0 2 4 0 4 0 1 1 3 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 3 0 0 1 0 0 0 0 0 4 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 6 1 2 0 7 0 0 0 0 2 0 0 0 0 0 0 0 4 0 1 2 0 1 0 3 0 1 0 3 0 1 1 0 0 1 0 4 0 0 0 0 0 0 2 6 1 2 0 1 2 0 0 1 0 0 0 6 3 2 0 0 0 0 0 0 0 2 2 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 7 2 0 0 0 1 5 0 0 0 0 0 0 0 1 0 0 1 3 0 1 0 0 0 3 0 0 0 0 2 2 0 3 0 0 0 0 1 0 1 0 1 0 0 10 0 0 2 0 1 0] 886 0.8877755511022044
import numpy as np a = np.arange(15).reshape(3, 5) a
结果:
array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]])
a.shape#(3, 5) 、#the number of axes (dimensions) of the array a.ndim#维度 2 a.dtype.name#‘int32‘ #the total number of elements of the array a.size#元素总个数 15
np.zeros ((3,4)) np.ones( (2,3,4), dtype=np.int32 )
结果:
array([[ 0., 0., 0., 0.], [ 0., 0., 0., 0.], [ 0., 0., 0., 0.]]) array([[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]])
#To create sequences of numbers np.arange( 10, 30, 5 )#array([10, 15, 20, 25]) np.arange( 0, 2, 0.3 )#array([ 0. , 0.3, 0.6, 0.9, 1.2, 1.5, 1.8])
np.arange(12).reshape(4,3)
结果:
array([[ 0, 1, 2], [ 3, 4, 5], [ 6, 7, 8], [ 9, 10, 11]])
np.random.random((2,3))
结果:
array([[ 0.40130659, 0.45452825, 0.79776512],
[ 0.63220592, 0.74591134, 0.64130737]])
from numpy import pi np.linspace( 0, 2*pi, 100 )#等差数列
结果:
array([ 0. , 0.06346652, 0.12693304, 0.19039955, 0.25386607, 0.31733259, 0.38079911, 0.44426563, 0.50773215, 0.57119866, 0.63466518, 0.6981317 , 0.76159822, 0.82506474, 0.88853126, 0.95199777, 1.01546429, 1.07893081, 1.14239733, 1.20586385, 1.26933037, 1.33279688, 1.3962634 , 1.45972992, 1.52319644, 1.58666296, 1.65012947, 1.71359599, 1.77706251, 1.84052903, 1.90399555, 1.96746207, 2.03092858, 2.0943951 , 2.15786162, 2.22132814, 2.28479466, 2.34826118, 2.41172769, 2.47519421, 2.53866073, 2.60212725, 2.66559377, 2.72906028, 2.7925268 , 2.85599332, 2.91945984, 2.98292636, 3.04639288, 3.10985939, 3.17332591, 3.23679243, 3.30025895, 3.36372547, 3.42719199, 3.4906585 , 3.55412502, 3.61759154, 3.68105806, 3.74452458, 3.8079911 , 3.87145761, 3.93492413, 3.99839065, 4.06185717, 4.12532369, 4.1887902 , 4.25225672, 4.31572324, 4.37918976, 4.44265628, 4.5061228 , 4.56958931, 4.63305583, 4.69652235, 4.75998887, 4.82345539, 4.88692191, 4.95038842, 5.01385494, 5.07732146, 5.14078798, 5.2042545 , 5.26772102, 5.33118753, 5.39465405, 5.45812057, 5.52158709, 5.58505361, 5.64852012, 5.71198664, 5.77545316, 5.83891968, 5.9023862 , 5.96585272, 6.02931923, 6.09278575, 6.15625227, 6.21971879, 6.28318531])
np.sin(np.linspace( 0, 2*pi, 100 ))
结果:
array([ 0.00000000e+00, 6.34239197e-02, 1.26592454e-01, 1.89251244e-01, 2.51147987e-01, 3.12033446e-01, 3.71662456e-01, 4.29794912e-01, 4.86196736e-01, 5.40640817e-01, 5.92907929e-01, 6.42787610e-01, 6.90079011e-01, 7.34591709e-01, 7.76146464e-01, 8.14575952e-01, 8.49725430e-01, 8.81453363e-01, 9.09631995e-01, 9.34147860e-01, 9.54902241e-01, 9.71811568e-01, 9.84807753e-01, 9.93838464e-01, 9.98867339e-01, 9.99874128e-01, 9.96854776e-01, 9.89821442e-01, 9.78802446e-01, 9.63842159e-01, 9.45000819e-01, 9.22354294e-01, 8.95993774e-01, 8.66025404e-01, 8.32569855e-01, 7.95761841e-01, 7.55749574e-01, 7.12694171e-01, 6.66769001e-01, 6.18158986e-01, 5.67059864e-01, 5.13677392e-01, 4.58226522e-01, 4.00930535e-01, 3.42020143e-01, 2.81732557e-01, 2.20310533e-01, 1.58001396e-01, 9.50560433e-02, 3.17279335e-02, -3.17279335e-02, -9.50560433e-02, -1.58001396e-01, -2.20310533e-01, -2.81732557e-01, -3.42020143e-01, -4.00930535e-01, -4.58226522e-01, -5.13677392e-01, -5.67059864e-01, -6.18158986e-01, -6.66769001e-01, -7.12694171e-01, -7.55749574e-01, -7.95761841e-01, -8.32569855e-01, -8.66025404e-01, -8.95993774e-01, -9.22354294e-01, -9.45000819e-01, -9.63842159e-01, -9.78802446e-01, -9.89821442e-01, -9.96854776e-01, -9.99874128e-01, -9.98867339e-01, -9.93838464e-01, -9.84807753e-01, -9.71811568e-01, -9.54902241e-01, -9.34147860e-01, -9.09631995e-01, -8.81453363e-01, -8.49725430e-01, -8.14575952e-01, -7.76146464e-01, -7.34591709e-01, -6.90079011e-01, -6.42787610e-01, -5.92907929e-01, -5.40640817e-01, -4.86196736e-01, -4.29794912e-01, -3.71662456e-01, -3.12033446e-01, -2.51147987e-01, -1.89251244e-01, -1.26592454e-01, -6.34239197e-02, -2.44929360e-16])
import numpy as np #the product operator * operates elementwise in NumPy arrays a = np.array( [20,30,40,50] ) b = np.arange( 4 ) print(a,b)#[20 30 40 50] [0 1 2 3] print(a-b)#[20 29 38 47] print(b**2)#[0 1 4 9] print(a<35)#[ True True False False]
import numpy as np B = np.arange(3) print(B)#[0 1 2] print(np.exp(B))#[1. 2.71828183 7.3890561 ] print(np.sqrt(B))#[0. 1. 1.41421356]
#Return the floor of the input a = np.floor(10*np.random.random((3,4)))# np.floor向下取整 print (a) print(a.shape) # flatten the array print (a.ravel()) #将矩阵变成向量 a.shape = (6, 2) print (a) print (a.T) a.resize((2,6)) print (a) #If a dimension is given as -1 in a reshaping operation, the other dimensions are automatically calculated: print(a.reshape(3,-1))
结果:
[[0. 2. 1. 0.] [2. 9. 1. 9.] [2. 0. 5. 8.]] (3, 4) [0. 2. 1. 0. 2. 9. 1. 9. 2. 0. 5. 8.] [[0. 2.] [1. 0.] [2. 9.] [1. 9.] [2. 0.] [5. 8.]] [[0. 1. 2. 1. 2. 5.] [2. 0. 9. 9. 0. 8.]] [[0. 2. 1. 0. 2. 9.] [1. 9. 2. 0. 5. 8.]] array([[0., 2., 1., 0.], [2., 9., 1., 9.], [2., 0., 5., 8.]])
resize和reshape这两组函数中区别很是类似,都是一个不改变之前的数组,一个改变数组本身
##resize和reshape这两组函数中区别很是类似,都是一个不改变之前的数组,一个改变数组本身 >>> import numpy as np >>> a = np.arange(20).reshape(4,5) >>> a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]]) >>> a.reshape(2,10) array([[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]]) >>> a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]]) >>> a.resize(2,10) >>> a array([[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]])
a = np.floor(10*np.random.random((2,2))) b = np.floor(10*np.random.random((2,2))) print (a) print (‘---‘) print (b) print (‘---‘) print (np.hstack((a,b)))#数据横着拼接 print (np.vstack((a,b)))#数据纵着拼接
结果:
[[9. 5.] [7. 0.]] --- [[7. 0.] [8. 8.]] --- [[9. 5. 7. 0.] [7. 0. 8. 8.]] [[9. 5.] [7. 0.] [7. 0.] [8. 8.]]
a = np.floor(10*np.random.random((2,12))) print (a) print (np.hsplit(a,3))#数据横着切分 print (np.hsplit(a,(3,4))) # Split a after the third and the fourth column 指定位置切分 a = np.floor(10*np.random.random((12,2))) print (a) print(np.vsplit(a,3))
结果:
[[1. 1. 2. 1. 1. 1. 1. 5. 4. 6. 9. 6.] [5. 1. 5. 5. 3. 1. 6. 9. 7. 4. 9. 7.]] [array([[1., 1., 2., 1.], [5., 1., 5., 5.]]), array([[1., 1., 1., 5.], [3., 1., 6., 9.]]), array([[4., 6., 9., 6.], [7., 4., 9., 7.]])] [array([[1., 1., 2.], [5., 1., 5.]]), array([[1.], [5.]]), array([[1., 1., 1., 5., 4., 6., 9., 6.], [3., 1., 6., 9., 7., 4., 9., 7.]])] [[5. 5.] [6. 0.] [7. 4.] [3. 1.] [3. 1.] [2. 1.] [7. 2.] [0. 2.] [1. 4.] [1. 0.] [1. 1.] [1. 7.]] [array([[5., 5.], [6., 0.], [7., 4.], [3., 1.]]), array([[3., 1.], [2., 1.], [7., 2.], [0., 2.]]), array([[1., 4.], [1., 0.], [1., 1.], [1., 7.]])]
#Simple assignments make no copy of array objects or of their data. import numpy as np a = np.arange(12) b = a # a and b are two names for the same ndarray object print(b is a)#True b.shape = 3,4 print (a.shape)#(3, 4) print (id(a))#102627728 print (id(b))#102627728 a,b只是名字不一样,地址相同,改变任何一个,另一个会随着变化
#The view method creates a new array object that looks at the same data. c = a.view()#浅复制 print(c is a) c.shape = 2,6 print (a.shape) c[0,4] = 1234 print(a) print(id(a)) print(id(c))#a,c指向地址不同,但是值是共用的
结果:
False (3, 4) [[ 0 1 2 3] [1234 5 6 7] [ 8 9 10 11]] 101985776 104761904
#The copy method makes a complete copy of the array and its data. d = a.copy() #深复制 print(d is a) d[0,0] = 9999 print (d) print (a)
结果:
#The copy method makes a complete copy of the array and its data. d = a.copy() #深复制 print(d is a) d[0,0] = 9999 print (d) print (a) False [[9999 1 2 3] [ 4 5 6 7] [ 8 9 10 11]] [[ 0 1 2 3] [ 4 5 6 7] [ 8 9 10 11]]
import numpy as np data = np.sin(np.arange(20)).reshape(5,4) print(data) ind = data.argmax(axis=0)#找出最大值得索引,axis=0表示按列 print(ind) data_max = data[ind, range(data.shape[1])] print(data_max) print(all(data_max == data.max(axis=0)))
结果:
[[ 0. 0.84147098 0.90929743 0.14112001] [-0.7568025 -0.95892427 -0.2794155 0.6569866 ] [ 0.98935825 0.41211849 -0.54402111 -0.99999021] [-0.53657292 0.42016704 0.99060736 0.65028784] [-0.28790332 -0.96139749 -0.75098725 0.14987721]] [2 0 3 1] [0.98935825 0.84147098 0.99060736 0.6569866 ] True
a = np.arange(0, 40, 10) b = np.tile(a, (3, 5)) print(b)
结果:
[[ 0 10 20 30 0 10 20 30 0 10 20 30 0 10 20 30 0 10 20 30] [ 0 10 20 30 0 10 20 30 0 10 20 30 0 10 20 30 0 10 20 30] [ 0 10 20 30 0 10 20 30 0 10 20 30 0 10 20 30 0 10 20 30]]
import numpy as np a = np.array([[9, 10, 5], [4, 6, 4]]) print(a) b = np.sort(a, axis=1)#不改变a的值,重新赋给新的值 print(b) print(a) a.sort(axis=1)#直接改变a的值 print(a) a = np.array([8, 10, 7, 6]) j = np.argsort(a)#值从小到大排序后的索引排序 print(j) print(a[j])
结果:
[[ 9 10 5] [ 4 6 4]] [[ 5 9 10] [ 4 4 6]] [[ 9 10 5] [ 4 6 4]] [[ 5 9 10] [ 4 4 6]] [3 2 0 1] [ 6 7 8 10]
import numpy as np #1:8*8棋盘矩阵,其中1、3、5、7行&&0、2、4、6列的元素置为1 1 ,3,5,7列&&0,2,4,6行也是1 z = np.zeros((8,8),dtype=int) z[1::2,::2] = 1 z[::2,1::2] = 1 print(z)
结果:
[[0 1 0 1 0 1 0 1] [1 0 1 0 1 0 1 0] [0 1 0 1 0 1 0 1] [1 0 1 0 1 0 1 0] [0 1 0 1 0 1 0 1] [1 0 1 0 1 0 1 0] [0 1 0 1 0 1 0 1] [1 0 1 0 1 0 1 0]]
import numpy as np #交换矩阵的其中两行 a = np.arange(9).reshape(3,3) print(a) print(a[[0,1]]) a[[0,1]] = a[[1,0]] print(a)
结果:
[[0 1 2] [3 4 5] [6 7 8]] [[0 1 2] [3 4 5]]
import numpy as np #找出数组中与给定值最接近的数 z = np.array([[10,11,12,13],[14,16,15,17]]) a = 15.1 print(np.abs(z-a)) print(np.abs(z-a).argmin())#6 print(z.ravel()[np.abs(z-a).argmin()])#15
结果:
[[5.1 4.1 3.1 2.1] [1.1 0.9 0.1 1.9]] 6 15
#判断二维矩阵中有没有一整列数为0? z = np.random.randint(0,3,(2,10)) print(z) print(z.any(axis=0))
结果:
[[1 1 2 0 0 1 1 0 2 2] [0 0 2 1 0 2 1 0 1 0]] [ True True True True False True True False True True]
np.random.randint生成二维的高斯矩阵
标签:from ike luci shape simple gui rman rda mes
原文地址:https://www.cnblogs.com/tianqizhi/p/9122042.html