0

I'm pretty new to this so sorry if this is a dumb question. I'm trying to sort some data. Here's a rank of countries by GDP for example, that I'd like to find percentages of, add up certain amounts top down (like a CDF), etc. How would I make a python script to go through the "spaces" and tabs. I'd like to also export it to an excel file.

1   European Union  $   15,970,000,000,000
2   United States   $   15,940,000,000,000
3   China   $   12,610,000,000,000
4   India   $    4,761,000,000,000
5   Japan   $    4,704,000,000,000
6   Germany $    3,250,000,000,000
7   Russia  $    2,555,000,000,000
8   Brazil  $    2,394,000,000,000
9   United Kingdom  $    2,375,000,000,000
10  France  $    2,291,000,000,000
11  Italy   $    1,863,000,000,000
12  Mexico  $    1,788,000,000,000
13  Korea, South    $    1,640,000,000,000
14  Canada  $    1,513,000,000,000
15  Spain   $    1,434,000,000,000
16  Indonesia   $    1,237,000,000,000
17  Turkey  $    1,142,000,000,000
18  Iran    $    1,016,000,000,000
19  Australia   $     986,700,000,000
20  Saudi Arabia    $     921,700,000,000

There are also variations in formatting?

Jon Clements
  • 138,671
  • 33
  • 247
  • 280
Alexander Kleinhans
  • 5,950
  • 10
  • 55
  • 111
  • 6
    Lots of separate things you want to do: which ones have you tried... and do you have some failed code to show? Otherwise, it sounds like you want us to do it all for you... – Jon Clements Nov 29 '13 at 15:26
  • Yea, I'm sorry about that. I'll might just delete this question and come up with a better one. – Alexander Kleinhans Nov 29 '13 at 17:28
  • 1
    Since this has no non-deleted answers - why not make this question a much more specific one with some aspect of what you're trying to do and what you've tried...? – Jon Clements Nov 29 '13 at 17:39

0 Answers0