Skip to content

Commit 7cca42f

Browse files
committed
STY: Improve style
1 parent 9a50a61 commit 7cca42f

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

pandas_datareader/compat/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
from io import StringIO
22
from urllib.error import HTTPError
33

4-
from packaging import version
5-
import pandas as pd
64
from pandas.api.types import is_list_like, is_number
75
from pandas.io import common as com
86
from pandas.testing import assert_frame_equal

pandas_datareader/tests/test_econdb.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@ def assert_equal(x, y):
1212

1313

1414
class TestEcondb(object):
15-
1615
def test_override_start_end(self):
1716
df = web.DataReader(
18-
'&'.join([
19-
'dataset=RBI_BULLETIN',
20-
'v=TIME',
21-
'h=Indicator',
22-
'from=2022-01-01',
23-
'to=2022-07-01'
24-
]),
25-
'econdb',
26-
start='2020-01-01',
27-
end='2022-01-01'
17+
"&".join(
18+
[
19+
"dataset=RBI_BULLETIN",
20+
"v=TIME",
21+
"h=Indicator",
22+
"from=2022-01-01",
23+
"to=2022-07-01",
24+
]
25+
),
26+
"econdb",
27+
start="2020-01-01",
28+
end="2022-01-01",
2829
)
2930
assert isinstance(df.index, pd.DatetimeIndex)
3031

pandas_datareader/tests/test_wb.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import pytest
77
import requests
88

9-
from pandas_datareader._testing import skip_on_exception
10-
from pandas_datareader._utils import RemoteDataError
119
from pandas_datareader.wb import (
1210
WorldBankReader,
1311
download,
@@ -189,7 +187,7 @@ def test_wdi_download_w_retired_indicator(self):
189187
inds = ["GDPPCKD"]
190188

191189
with pytest.raises(ValueError):
192-
result = download(
190+
download(
193191
country=cntry_codes,
194192
indicator=inds,
195193
start=2003,
@@ -202,7 +200,7 @@ def test_wdi_download_w_crash_inducing_countrycode(self):
202200
inds = ["NY.GDP.PCAP.CD"]
203201

204202
with pytest.raises(ValueError):
205-
result = download(
203+
download(
206204
country=cntry_codes,
207205
indicator=inds,
208206
start=2003,

pandas_datareader/yahoo/actions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pandas as pd
12
from pandas import DataFrame, MultiIndex
23

34
from pandas_datareader.yahoo.daily import YahooDailyReader
@@ -42,7 +43,7 @@ def _get_one_action(data):
4243
splits = DataFrame(data["Splits"]).dropna()
4344
splits["action"] = "SPLIT"
4445
splits = splits.rename(columns={"Splits": "value"})
45-
actions = concat([actions, splits], sort=True)
46+
actions = pd.concat([actions, splits], sort=True, axis=1)
4647
actions = actions.sort_index(ascending=False)
4748

4849
return actions

0 commit comments

Comments
 (0)