From 686c0c3224c9091d44e272dd751f68f375b4b62d Mon Sep 17 00:00:00 2001 From: Shlomi Kushchi Date: Wed, 24 Mar 2021 10:11:06 +0200 Subject: [PATCH] new pandas index uses to_numpy(), not get_values() https://github.com/quantopian/alphalens/issues/379#issuecomment-654558947 --- zipline/data/data_portal_live.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipline/data/data_portal_live.py b/zipline/data/data_portal_live.py index 3a7a80342f..905ace5a35 100644 --- a/zipline/data/data_portal_live.py +++ b/zipline/data/data_portal_live.py @@ -119,7 +119,7 @@ def get_scalar_asset_spot_value(self, asset, field, dt, data_frequency): data_frequency = '1d' prices = self.broker.get_realtime_bars([asset], data_frequency) if field == 'last_traded': - return pd.Timestamp(prices[asset.symbol][-1:].index.get_values()[0]) + return pd.Timestamp(prices[asset.symbol][-1:].index.to_numpy()[0]) elif field == 'volume': return prices[asset.symbol][field][-1] * 100 elif field == 'price':