Skip to content

Commit

Permalink
DOC: Improve to_parquet documentation (#33709)
Browse files Browse the repository at this point in the history
  • Loading branch information
larroy authored May 30, 2020
1 parent 1cad9e5 commit d5e8edc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2292,6 +2292,16 @@ def to_parquet(
col1 col2
0 1 3
1 2 4
If you want to get a buffer to the parquet content you can use a io.BytesIO
object, as long as you don't use partition_cols, which creates multiple files.
>>> import io
>>> f = io.BytesIO()
>>> df.to_parquet(f)
>>> f.seek(0)
0
>>> content = f.read()
"""
from pandas.io.parquet import to_parquet

Expand Down

0 comments on commit d5e8edc

Please sign in to comment.