Skip to content

Commit 8790b26

Browse files
author
David Stephens
committed
UPD: Revert changes in convert_objects
Reverted in upstream.
1 parent 5251665 commit 8790b26

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

pandas_datareader/wb.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from __future__ import print_function
44

5-
from distutils.version import LooseVersion
65
import warnings
76

87
from pandas.compat import reduce, lrange
@@ -11,7 +10,6 @@
1110
import pandas
1211
import numpy as np
1312

14-
PD017 = LooseVersion(pandas.__version__) > LooseVersion('0.16.2')
1513
# This list of country codes was pulled from wikipedia during October 2014.
1614
# While some exceptions do exist, it is the best proxy for countries supported
1715
# by World Bank. It is an aggregation of the 2-digit ISO 3166-1 alpha-2, and
@@ -158,12 +156,7 @@ def download(country=['MX', 'CA', 'US'], indicator=['NY.GDP.MKTP.CD', 'NY.GNS.IC
158156
out = reduce(lambda x, y: x.merge(y, how='outer'), data)
159157
out = out.drop('iso_code', axis=1)
160158
out = out.set_index(['country', 'year'])
161-
if PD017:
162-
kwargs = dict((kw, True)
163-
for kw in ('datetime', 'numeric', 'timedelta'))
164-
else:
165-
kwargs = {'convert_numeric': True}
166-
out = out.convert_objects(**kwargs)
159+
out = out.convert_objects(convert_numeric=True)
167160
return out
168161
else:
169162
msg = "No indicators returned data."

0 commit comments

Comments
 (0)