Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

allow compression in the write_to function #701

@ron819

Description

@ron819

I'm using the library as follows:

storage.Bucket('bucket_name').item(path).write_to(df['results'].to_json(), 'application/json')

It would be nice if the write_to function will also have the ability to do compression.
For example data frame has the ability to :

        df.to_csv(path_or_buf=file_name, index=False, encoding='utf-8',
                  compression='gzip',
                  quoting=QUOTE_NONNUMERIC)

However this requires me to save the file locally and only then upload it (same for csv and json)
So as I said, it would be nice if compression='gzip' would be av liable in the write_to function

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions