Skip to content

Commit 6eacb75

Browse files
committed
Improve to_parquet documentation
fixes #29476
1 parent 8282ee2 commit 6eacb75

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/core/frame.py

+7
Original file line numberDiff line numberDiff line change
@@ -2215,6 +2215,13 @@ def to_parquet(
22152215
col1 col2
22162216
0 1 3
22172217
1 2 4
2218+
2219+
If you want get a buffer to the parquet content you can use a io.BytesIO object
2220+
2221+
>>> f = io.BytesIO()
2222+
>>> df.to_parquet(f)
2223+
>>> f.seek(0)
2224+
>>> content=f.read()
22182225
"""
22192226
from pandas.io.parquet import to_parquet
22202227

0 commit comments

Comments
 (0)