MAINT: use column's missing value.

STY: fix flake8 failures.

MAINT: fixes for compatibility with py2.

MAINT: fix import error.

MAINT: use dict.items() for compatibility with py3.
This commit is contained in:
Maya Tydykov
2016-02-25 17:33:42 -05:00
parent 7100e60474
commit 7ddf18b407
7 changed files with 18 additions and 26 deletions
+3 -3
View File
@@ -119,7 +119,7 @@ def zip_with_dates(index_dates, dts):
return pd.Series(pd.to_datetime(dts), index=index_dates)
class BuybackAuthLoaderCommonTest:
class BuybackAuthLoaderCommonTest(object):
"""
Tests for loading the buyback authorization announcement data.
"""
@@ -294,8 +294,8 @@ class CashBuybackAuthLoaderTestCase(TestCase, BuybackAuthLoaderCommonTest):
# until 15?
A: zip_with_floats_dates(
['NaN'] * num_days_between(dates, None, '2014-01-14') +
[10] * num_days_between_dates('2014-01-15', '2014-01-19') +
[20] * num_days_between_dates('2014-01-20', None)
[10] * num_days_between_dates('2014-01-15', '2014-01-19') +
[20] * num_days_between_dates('2014-01-20', None)
),
B: zip_with_floats_dates(
['NaN'] * num_days_between_dates(None, '2014-01-14') +
+7 -5
View File
@@ -393,9 +393,11 @@ class EarningsCalendarLoaderInferTimestampTestCase(TestCase):
)
assert_series_equal(
loader.events_by_sid[1].loc[:, ANNOUNCEMENT_FIELD_NAME],
pd.Series(index=announcement_dates[1].loc[:, TS_FIELD_NAME],
data=np.array(
announcement_dates[1].loc[:, ANNOUNCEMENT_FIELD_NAME]
),
name=ANNOUNCEMENT_FIELD_NAME)
pd.Series(
index=announcement_dates[1].loc[:, TS_FIELD_NAME],
data=np.array(
announcement_dates[1].loc[:, ANNOUNCEMENT_FIELD_NAME]
),
name=ANNOUNCEMENT_FIELD_NAME
)
)