mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-28 12:08:34 +08:00
MAINT: Use sort_values() instead of sort().
pd.DataFrame.sort() is deprecated.
This commit is contained in:
@@ -153,7 +153,7 @@ class EventIndexerTestCase(ZiplineTestCase):
|
||||
@classmethod
|
||||
def init_class_fixtures(cls):
|
||||
super(EventIndexerTestCase, cls).init_class_fixtures()
|
||||
cls.events = make_events(add_nulls=False).sort('event_date')
|
||||
cls.events = make_events(add_nulls=False).sort_values('event_date')
|
||||
cls.events.reset_index(inplace=True)
|
||||
|
||||
def test_previous_event_indexer(self):
|
||||
|
||||
@@ -109,10 +109,12 @@ class EventsLoader(PipelineLoader):
|
||||
events = events[events[EVENT_DATE_FIELD_NAME].notnull()]
|
||||
|
||||
# We always work with entries from ``events`` directly as numpy arrays,
|
||||
# so we coerce from a frame here.
|
||||
# so we coerce from a frame to a dict of arrays here.
|
||||
self.events = {
|
||||
name: np.asarray(series)
|
||||
for name, series in events.sort(EVENT_DATE_FIELD_NAME).iteritems()
|
||||
for name, series in (
|
||||
events.sort_values(EVENT_DATE_FIELD_NAME).iteritems()
|
||||
)
|
||||
}
|
||||
|
||||
# Columns to load with self.load_next_events.
|
||||
|
||||
Reference in New Issue
Block a user