Доброго времени суток всем !
есть небольшая практическая задача…
есть толстый текстовой файл выдранный из пдф-а
содержащий отчет о расчетах, в нем есть значения , которые необходимо как-то вытащить и записать в виде пригодном для обработки
например запихнуть все в дбф-файл
из файла надо вытащить значения для конкретных стран
начиная с Albania 5.99 и до конца страницы
что из возможностей питона для этого надо и какая общая процедура обработки ?
файл примерно такого вида
приведено одна страница но их намного!!! больше
Variable #: 58 Code: ENEFF Reference Year: MRYA 1998-2002
Description: Energy efficiency
Units: Terajoules energy consumption per million dollars GDP (PPP)
Source*: US Energy Information Agency (EIA).
Logic: The more efficient an economy is, the less energy it needs to produce a given set of goods and services.
Methodology: The original data are in billion British Thermal Units (BTUs), which are converted to terajoules. The factor
applied to convert 10^9 BTUs to terajoules is .9478 (Source: Energy Information Administration). Total energy
consumption was normalized by GDP in million US dollars in purchasing power parities (PPPs).
Mean 8.17 Max 47.74 2.5 Percentile 1.04
Median 5.91 Min 0.24 97.5 Percentile 31.46
Albania 5.99 Ecuador 7.55 Lebanon 11.09 Saudi Arabia 17.60
Algeria 6.77 Egypt 8.80 Liberia Senegal 3.84
Angola 4.30 El Salvador 3.57 Libya Serbia and Mont.
Argentina 5.66 Estonia 9.88 Lithuania 11.89 Sierra Leone 4.79
Armenia 15.96 Ethiopia 1.28 Macedonia 7.89 Slovakia 11.54
Australia 9.54 Finland 8.56 Madagascar 2.21 Slovenia 7.87
Austria 5.62 France 6.51 Malawi 3.40 South Africa 9.42
Azerbaijan 21.90 Gabon 4.18 Malaysia 9.94 South Korea 9.86
Bangladesh 2.34 Gambia 1.65 Mali 1.19 Spain 6.33
Belarus 19.93 Georgia 15.37 Mauritania 7.74 Sri Lanka 2.67
Belgium 9.08 Germany 6.04 Mexico 6.94 Sudan 2.37
Benin 3.54 Ghana 3.08 Moldova 24.88 Sweden 9.09
Bhutan Greece 6.57 Mongolia 18.95 Switzerland 5.50
Bolivia 6.71 Guatemala 3.29 Morocco 3.86 Syria 13.21
Bosnia and Herz. Guinea 1.37 Mozambique 4.93 Taiwan 11.28
Botswana 3.49 Guinea-Bissau 4.84 Myanmar Tajikistan 35.43
Brazil 6.03 Guyana 6.79 Namibia 3.77 Tanzania 3.25
Bulgaria 14.21 Haiti 1.87 Nepal 1.72 Thailand 6.75
Burkina Faso 1.27 Honduras 5.38 Netherlands 7.90 Togo 2.37
Burundi 1.60 Hungary 7.33 New Zealand 9.72 Trin. and Tob. 38.67
Cambodia 0.30 Iceland 15.61 Nicaragua 4.44 Tunisia 4.84
Cameroon 2.47 India 4.73 Niger 1.78 Turkey 6.59
Canada 13.39 Indonesia 6.18 Nigeria 7.80 Turkmenistan 24.07
Central Afr. Rep. 1.19 Iran 12.68 North Korea Uganda 1.01
Chad 0.34 Iraq Norway 11.38 Ukraine 26.19
Chile 6.54 Ireland 4.16 Oman 10.11 United Arab. Em. 32.28
China 6.98 Israel 5.88 P. N. Guinea 3.56 United Kingdom 5.86
Colombia 4.12 Italy 4.76 Pakistan 6.17 United States 8.99
Congo 4.48 Jamaica 13.66 Panama 10.78 Uruguay 5.45
Costa Rica 4.19 Japan 6.07 Paraguay 14.67 Uzbekistan 47.74
Cфte d'Ivoire 3.95 Jordan 9.78 Peru 4.03 Venezuela 20.39
Croatia 7.80 Kazakhstan 22.63 Philippines 3.35 Viet Nam 4.46
Cuba Kenya 4.62 Poland 7.77 Yemen 8.79
Czech Rep. 9.29 Kuwait 23.89 Portugal 5.50 Zambia 11.59
Dem. Rep. Congo 2.31 Kyrgyzstan 26.83 Romania 11.12 Zimbabwe 5.99
Denmark 4.75 Laos 3.98 Russia 21.93
Dominican Rep. 4.39 Latvia 8.43 Rwanda 1.25
* Full source information for this variable can be found at the end of this Appendix. Data in “” indicate imputed values; “..” means the data
point is missing.2005 ESI: Appendix C Variable Profiles
316