Lean  $LEAN_TAG$
QuantConnect.Python.PandasData Class Reference

Organizes a list of data to create pandas.DataFrames More...

Public Member Functions

 PandasData (object data)
 Initializes an instance of PandasData More...
 
void Add (object baseData)
 Adds security data object to the end of the lists More...
 
void Add (TradeBar tradeBar, QuoteBar quoteBar)
 Adds Lean data objects to the end of the lists More...
 
void AddTick (Tick tick)
 Adds a tick data point to this pandas collection More...
 
PyObject ToPandasDataFrame (int levels=2, bool filterMissingValueColumns=true)
 Get the pandas.DataFrame of the current PandasData state More...
 

Static Public Member Functions

static PyObject ToPandasDataFrame (IEnumerable< PandasData > pandasDatas)
 Helper method to create a single pandas data frame indexed by symbol More...
 

Properties

bool IsCustomData [get]
 Gets true if this is a custom data request, false for normal QC data More...
 
int Levels = 2 [get]
 Implied levels of a multi index pandas.Series (depends on the security type) More...
 

Detailed Description

Organizes a list of data to create pandas.DataFrames

Definition at line 34 of file PandasData.cs.

Constructor & Destructor Documentation

◆ PandasData()

QuantConnect.Python.PandasData.PandasData ( object  data)

Initializes an instance of PandasData

Definition at line 161 of file PandasData.cs.

Here is the call graph for this function:

Member Function Documentation

◆ Add() [1/2]

void QuantConnect.Python.PandasData.Add ( object  baseData)

Adds security data object to the end of the lists

Parameters
baseDataIBaseData object that contains security data

Definition at line 266 of file PandasData.cs.

Here is the call graph for this function:

◆ Add() [2/2]

void QuantConnect.Python.PandasData.Add ( TradeBar  tradeBar,
QuoteBar  quoteBar 
)

Adds Lean data objects to the end of the lists

Parameters
tradeBarTradeBar object that contains trade bar information of the security
quoteBarQuoteBar object that contains quote bar information of the security

Definition at line 340 of file PandasData.cs.

◆ AddTick()

void QuantConnect.Python.PandasData.AddTick ( Tick  tick)

Adds a tick data point to this pandas collection

Parameters
tickTick object that contains tick information of the security

Definition at line 384 of file PandasData.cs.

Here is the caller graph for this function:

◆ ToPandasDataFrame() [1/2]

PyObject QuantConnect.Python.PandasData.ToPandasDataFrame ( int  levels = 2,
bool  filterMissingValueColumns = true 
)

Get the pandas.DataFrame of the current PandasData state

Parameters
levelsNumber of levels of the multi index
filterMissingValueColumnsIf false, make sure columns with "missing" values only are still added to the dataframe
Returns
pandas.DataFrame object

Definition at line 434 of file PandasData.cs.

Here is the caller graph for this function:

◆ ToPandasDataFrame() [2/2]

static PyObject QuantConnect.Python.PandasData.ToPandasDataFrame ( IEnumerable< PandasData pandasDatas)
static

Helper method to create a single pandas data frame indexed by symbol

Will add a single point per pandas data series (symbol)

Definition at line 533 of file PandasData.cs.

Property Documentation

◆ IsCustomData

bool QuantConnect.Python.PandasData.IsCustomData
get

Gets true if this is a custom data request, false for normal QC data

Definition at line 124 of file PandasData.cs.

◆ Levels

int QuantConnect.Python.PandasData.Levels = 2
get

Implied levels of a multi index pandas.Series (depends on the security type)

Definition at line 129 of file PandasData.cs.


The documentation for this class was generated from the following file: