Export¶
-
class
previsionio.export.
Export
(_id, exporter_id: str, dataset_id: str = None, prediction_id: str = None, status: str = None, **kwargs)¶ Bases:
previsionio.api_resource.ApiResource
,previsionio.api_resource.UniqueResourceMixin
An export
Parameters: -
classmethod
_new
(exporter_id: str, prediction: Union[previsionio.prediction.DeploymentPrediction, previsionio.prediction.ValidationPrediction] = None, dataset: previsionio.dataset.Dataset = None, file_path: str = None, encoding: str = None, separator: str = None, decimal: str = None, thousands: str = None, wait_for_export: bool = False, **kwargs)¶ Create a new exporter object on the platform.
Parameters: - exporter_id (str) – Unique exporter id on which to create the export
- prediction (
DeploymentPrediction`|:class:
.ValidationPrediction`, optional) – prediction to upload - dataset (
Dataset
, optional) – Dataset to upload - file_path (str, optional) – Path of the file to upload
- encoding (str, optional) – Encoding of the file to upload
- separator (str, optional) – Separator of the file to upload
- decimal (str, optional) – Decimal of the file to upload
- thousands (str, optional) – Thousands of the file to upload
- wait_for_export (bool, optional) – Wether to wait until the export is complete or not
Returns: The registered export object
Return type: Raises: PrevisionException
– Any error while uploading data to the platform or parsing the resultException
– For any other unknown error
-
classmethod
export_dataset
(exporter_id, dataset: previsionio.dataset.Dataset, wait_for_export: bool = False)¶ Upload a
Dataset
from the current active project using an exporter.Parameters: Returns: The registered export object
Return type:
-
classmethod
export_file
(exporter_id: str, file_path: str, encoding: str = None, separator: str = None, decimal: str = None, thousands: str = None, wait_for_export: bool = False, **kwargs)¶ Upload a CSV file using an exporter.
Parameters: - exporter_id (str) – Unique exporter id on which to create the export
- file_path (str) – Path of the file to upload
- encoding (str, optional) – Encoding of the file to upload
- separator (str, optional) – Separator of the file to upload
- decimal (str, optional) – Decimal of the file to upload
- thousands (str, optional) – Thousands of the file to upload
- wait_for_export (bool, optional) – Wether to wait until the export is complete or not
Returns: The registered export object
Return type:
-
classmethod
export_prediction
(exporter_id, prediction: Union[previsionio.prediction.DeploymentPrediction, previsionio.prediction.ValidationPrediction], wait_for_export: bool = False)¶ Upload a
DeploymentPrediction
or aValidationPrediction
from the current active project using an exporter.Parameters: Returns: The registered export object
Return type:
-
classmethod