PandasConverter
QuantConnect.Python.PandasConverter
Bases: Object
Collection of methods that converts lists of objects in pandas.DataFrame
get_indicator_data_frame
get_indicator_data_frame(data: Any) -> DataFrame
get_indicator_data_frame(
data: List[KeyValuePair[str, List[IndicatorDataPoint]]],
extra_data: List[
KeyValuePair[
str, List[ValueTuple[datetime, Object]]
]
] = None,
) -> DataFrame
Converts a dictionary with a list of IndicatorDataPoint in a pandas.DataFrame
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Any | List[KeyValuePair[str, List[IndicatorDataPoint]]]
|
PyObject that should be a dictionary (convertible to PyDict) of string to list of IndicatorDataPoint |
required |
extra_data
|
Optional[List[KeyValuePair[str, List[ValueTuple[datetime, Object]]]]]
|
Optional dynamic properties to include in the DataFrame. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
PyObject containing a pandas.DataFrame. |
concat_data_frames
concat_data_frames(
data_frames: List[Any],
sort: bool = True,
dropna: bool = True,
) -> Any
get_data_frame
get_data_frame(
data: List[Slice],
flatten: bool = False,
data_type: Type = None,
) -> DataFrame
Converts an enumerable of Slice in a pandas.DataFrame
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
List[Slice]
|
Enumerable of Slice |
required |
flatten
|
bool
|
Whether to flatten collections into rows and columns |
False
|
data_type
|
Type
|
Optional type of bars to add to the data frame If true, the base data items time will be ignored and only the base data collection time will be used in the index |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
PyObject containing a pandas.DataFrame. |
to_string
to_string() -> str
Returns a string that represent the current object