Save the provided data object as a pickle-formatted binary data on the disk. :param data: data to store :return: (str) Path where the data has been saved
(self, data: Union[dict, List[dict]])
| 195 | raise NotImplementedError() |
| 196 | |
| 197 | def save_binary(self, data: Union[dict, List[dict]]) -> str: |
| 198 | """ |
| 199 | Save the provided data object as a pickle-formatted binary data on the disk. |
| 200 | :param data: data to store |
| 201 | :return: (str) Path where the data has been saved |
| 202 | """ |
| 203 | path, _ = os.path.splitext(self.output_path) |
| 204 | binary_path = os.path.extsep.join((path, "pickle")) |
| 205 | |
| 206 | with open(binary_path, "wb+") as f_output: |
| 207 | pickle.dump(data, f_output) |
| 208 | |
| 209 | return binary_path |
| 210 | |
| 211 | @staticmethod |
| 212 | def from_str( |
no outgoing calls
no test coverage detected