'Country  Metric           2011   2012   2013  2014\nUSA     GDP               7      4     0      2\nUSA     Pop.              2      3     0      3\nGB      GDP               8      7     0      7\nGB      Pop.              2      6     0      0\nFR      GDP               5      0     0      1\nFR      Pop.              1      1     0      5\n'
How can I resolve TypeError with StringIO in Python 2.7?