Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Reindexing assets in zipline

For my project I have ingested the quandl bundle for the data, and narrowed it down ( universe = AverageDollarVolume(window_length=120).top(99) ).
If I put the assets in a list it looks like:

[Equity(2 [AAL]), Equity(8 [AAPL]),
Equity(12 [ABBV]),
Equity(85 [AGN]),
Equity(98 [AIG]),
Equity(149 [AMGN]),
Equity(167 [AMZN]), ....

But I want the list starting from 0 and no missing numbers, thus like;

[Equity(0 [AAL]), Equity(1 [AAPL]),
Equity(2 [ABBV]),
Equity(3 [AGN]),
Equity(4 [AIG]),
Equity(5 [AMGN]),
Equity(6 [AMZN]), ....

So same asset, but different index.

I have been trying to write some code that does this, but failed every time...
Help is appreciated :)