Motivation: - When user want to get a quick data handler. The created data handler will have only one shared Dataframe without processors. After creating the handler, user may often want to dump the handler for reuse Here is a typical use case .. co
(cls, df: pd.DataFrame)
| 764 | |
| 765 | @classmethod |
| 766 | def from_df(cls, df: pd.DataFrame) -> "DataHandlerLP": |
| 767 | """ |
| 768 | Motivation: |
| 769 | - When user want to get a quick data handler. |
| 770 | |
| 771 | The created data handler will have only one shared Dataframe without processors. |
| 772 | After creating the handler, user may often want to dump the handler for reuse |
| 773 | Here is a typical use case |
| 774 | |
| 775 | .. code-block:: python |
| 776 | |
| 777 | from qlib.data.dataset import DataHandlerLP |
| 778 | dh = DataHandlerLP.from_df(df) |
| 779 | dh.to_pickle(fname, dump_all=True) |
| 780 | |
| 781 | TODO: |
| 782 | - The StaticDataLoader is quite slow. It don't have to copy the data again... |
| 783 | |
| 784 | """ |
| 785 | loader = data_loader_module.StaticDataLoader(df) |
| 786 | return cls(data_loader=loader) |
no outgoing calls