Skip to content

docs(python): Document write_ipc buffer behavior with file=None#27430

Merged
ritchie46 merged 1 commit intopola-rs:mainfrom
uurl:docs/write-ipc-file-none-18200
Apr 28, 2026
Merged

docs(python): Document write_ipc buffer behavior with file=None#27430
ritchie46 merged 1 commit intopola-rs:mainfrom
uurl:docs/write-ipc-file-none-18200

Conversation

@uurl
Copy link
Copy Markdown
Contributor

@uurl uurl commented Apr 28, 2026

Closes #18200.

Documents the behavior of DataFrame.write_ipc(file=None).

When file=None, write_ipc returns a BytesIO object. The buffer position is left at the end of the written data, so users need to call seek(0) before reading it back with pl.read_ipc.

Added a short docstring example showing:

buf = df.write_ipc(file=None)
buf.seek(0)
pl.read_ipc(buf).equals(df)

AI usage:

  • I used AI to help draft the documentation wording and PR description.
  • I confirm that I have reviewed all changes myself, and I believe they are relevant and correct.
issue18200

@github-actions github-actions Bot added documentation Improvements or additions to documentation python Related to Python Polars first-contribution First contribution by user labels Apr 28, 2026
@ritchie46 ritchie46 merged commit 0a0aef9 into pola-rs:main Apr 28, 2026
28 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.29%. Comparing base (693c520) to head (3299251).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27430      +/-   ##
==========================================
+ Coverage   81.19%   81.29%   +0.10%     
==========================================
  Files        1832     1832              
  Lines      253247   253263      +16     
  Branches     3176     3176              
==========================================
+ Hits       205626   205895     +269     
+ Misses      46798    46545     -253     
  Partials      823      823              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uurl uurl deleted the docs/write-ipc-file-none-18200 branch April 29, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation first-contribution First contribution by user python Related to Python Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use of write_ipc with file=None

2 participants