PandasData
QuantConnect.Python.PandasData
PandasData(data: Any, time_as_column: bool = False)
Bases: Object
Organizes a list of data to create pandas.DataFrames
Initializes an instance of PandasData
is_custom_data
is_custom_data: bool
Gets true if this is a custom data request, false for normal QC data
levels
levels: int
Implied levels of a multi index pandas.Series (depends on the security type)
add
Signature descriptions:
-
Adds security data object to the end of the lists
-
Adds Lean data objects to the end of the lists
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Optional[Any]
|
IBaseData object that contains security data |
None
|
trade_bar
|
Optional[TradeBar]
|
TradeBar object that contains trade bar information of the security |
None
|
quote_bar
|
Optional[QuoteBar]
|
QuoteBar object that contains quote bar information of the security |
None
|
to_pandas_data_frame
to_pandas_data_frame(
levels: int = 2,
filter_missing_value_columns: bool = True,
) -> DataFrame
to_pandas_data_frame(
pandas_datas: List[PandasData],
skip_times_column: bool = False,
) -> Any
Signature descriptions:
-
Get the pandas.DataFrame of the current PandasData state
-
Helper method to create a single pandas data frame indexed by symbol
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
levels
|
Optional[int]
|
Number of levels of the multi index |
2
|
filter_missing_value_columns
|
Optional[bool]
|
If false, make sure columns with "missing" values only are still added to the dataframe |
True
|
Returns:
| Type | Description |
|---|---|
DataFrame | Any
|
pandas.DataFrame object. |