Hello, I'm new, I just started using lean and jupyterlab in the research environment on my own computer
I'm reading from below link to use ‘History’ to request data, according the document, the jupyterlab is supposed to display dataframe in html table, but in my jupyterlab, the dataframe returned from History call is not displayed
I double checked by using ‘type()’ function for the variable that holds the return of ‘History’ call, the variable type is ‘pandas.core.frame.DataFrame’
did I miss any setup or something? How can I display dataframe returned from History as html table?
my code in notebook:
qb = QuantBook()
qb.SetTimeZone(TimeZones.Chicago)
qb.SetStartDate(2021, 4, 1)
qb.SetEndDate(2022, 3, 31)
spy = qb.AddEquity("SPY")
history = qb.History(spy.Symbol, Resolution.Daily) # type(history) = pandas.core.frame.DataFrame
thank you!
Yang Jin
I'm sorry, this is not lean research jupyterlab issue, i missed 2nd parameter in the ‘History’ call, the length of the dataframe was 0, that's why there was no display, if dataframe has data, it will display html table as document presents, no setup needed
Yang Jin
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!