whylogs.api.writer.gcs
#
Module Contents#
Classes#
A whylogs writer to upload DatasetProfileViews onto Google Cloud Storage (GCS). |
Attributes#
- whylogs.api.writer.gcs.logger#
- class whylogs.api.writer.gcs.GCSWriter(gcs_client: Optional[google.cloud.storage.Client] = None, object_name: Optional[str] = None, bucket_name: Optional[str] = None)#
Bases:
whylogs.api.writer.Writer
A whylogs writer to upload DatasetProfileViews onto Google Cloud Storage (GCS).
>**IMPORTANT**: In order to correctly connect to your GCS container, make sure you have the following environment variables set: [GOOGLE_APPLICATION_CREDENTIALS]
- Parameters
- Returns
- Return type
Examples
An example usage of this method can be represented with the simple code above. Here we are assuming the user has already assigned a pandas.DataFrame to the df variable.
```python import whylogs as why
profile = why.log(pandas=df) profile.writer(“gcs”).option(bucket_name=”my_bucket”).write() ```
- write(file: whylogs.api.writer.writer.Writable, dest: Optional[str] = None, **kwargs: Any) Tuple[bool, str] #
- Parameters
file (whylogs.api.writer.writer.Writable) –
dest (Optional[str]) –
kwargs (Any) –
- Return type