|
24 | 24 |
|
25 | 25 |
|
26 | 26 | class BaseDataHandler(Serializable): |
27 | | - """This is an interface for data handler. |
28 | | - It does not assume the internal data structure of the data handler. |
29 | | - It only defines the interface for external users (use dataframe as the internal data structure). |
| 27 | + """ |
| 28 | + Interface for data handler. |
| 29 | +
|
| 30 | + This class does not assume the internal data structure of the data handler. |
| 31 | + It only defines the interface for external users (uses DataFrame as the internal data structure). |
30 | 32 |
|
31 | 33 | In the future, the data handler's more detailed implementation should be refactored. Here are some guidelines: |
32 | 34 |
|
33 | 35 | It covers several components: |
| 36 | +
|
34 | 37 | - [data loader] -> internal representation of the data -> data preprocessing -> interface adaptor for the fetch interface |
35 | 38 | - The workflow to combine them all: |
36 | | - - The workflow may be very complicated. DataHandlerLP is one of the practices, but it can't satisfy all the requirements. |
37 | | - So leaving the flexibility to the user to implement the workflow is a more reasonable choice. |
38 | | -
|
| 39 | + The workflow may be very complicated. DataHandlerLP is one of the practices, but it can't satisfy all the requirements. |
| 40 | + So leaving the flexibility to the user to implement the workflow is a more reasonable choice. |
39 | 41 | """ |
40 | 42 |
|
41 | 43 | def __init__(self, *args, **kwargs): |
@@ -65,11 +67,11 @@ def fetch( |
65 | 67 |
|
66 | 68 | class DataHandler(BaseDataHandler): |
67 | 69 | """ |
68 | | -
|
69 | 70 | The motivation of DataHandler: |
70 | | - - it proivdes a implementation of BaseDataHandler that we implement it with |
71 | | - - Handle response with a internal loaded dataframe |
72 | | - - the dataframe is loaded by a data loader. |
| 71 | +
|
| 72 | + - It provides an implementation of BaseDataHandler that we implement with: |
| 73 | + - Handling responses with an internal loaded DataFrame |
| 74 | + - The DataFrame is loaded by a data loader. |
73 | 75 |
|
74 | 76 | The steps to using a handler |
75 | 77 | 1. initialized data handler (call by `init`). |
|
0 commit comments