Skip to content

Commit

Permalink
new pandas index uses to_numpy(), not get_values()
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomiku committed Mar 24, 2021
1 parent a1cc31c commit 686c0c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zipline/data/data_portal_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 686c0c3

Please sign in to comment.