For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
How to convert GenericCSVData to pandas dataframe
-
Hi,
How to print values in a GenericCSVData object as if it is a time series of OHLCVOI columes? and how to convert a GenericCSVData object to pandas dataframe?
Thank you. -
@Yelloww said in How to convert GenericCSVData to pandas dataframe:
How to print values in a GenericCSVData object as if it is a time series of OHLCVOI columes?
Look at this post: https://community.backtrader.com/topic/270/how-do-i-access-past-raw-data-in-strategy/
Accessing each line of the
GenericCSVData
and then the mentionedarray
attribute, should allow you to do it.and how to convert a GenericCSVData object to pandas dataframe?
Use
array
attribute again and use as the seed for the Dataframe columns.