convert datas into a pandas DataFrame
I have a similar issue, I'm creating a new indicator and I find it would be really useful to have the datas (or to be able to convert it) as a pandas dataframe.
There is a quantity of packages available in python to do advanced math using dataframes, additionally handling dataframes is so much easier and common practice that it just makes sense to have a
as_dataframemethod to get a pandas representation of it.
One of goals of backtrader was to not rely on libraries which are not part of the standard Python distribution, no matter how many million users it may have.
as_dataframemethod would break that goal. Furthermore, understanding your point, you have to consider that the internal representation of the lines is not a table-like structure (like it is the case for a
You can slice, so to say, with the
getmethod of a line and pass the resulting array to the
See: Docs - Platform Concepts - Section: Slicing