mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Remove redundant empty-frame guard in FocusCsvSerializer
Polars write_csv already handles empty DataFrames correctly (outputs header-only CSV), so the conditional branch was a no-op. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
230c85313b
commit
9e623ceaff
1 changed files with 1 additions and 2 deletions
|
|
@ -16,7 +16,6 @@ class FocusCsvSerializer(FocusSerializer):
|
|||
|
||||
def serialize(self, frame: pl.DataFrame) -> bytes:
|
||||
"""Encode the provided frame as a CSV payload."""
|
||||
target = frame if not frame.is_empty() else pl.DataFrame(schema=frame.schema)
|
||||
buffer = io.BytesIO()
|
||||
target.write_csv(buffer)
|
||||
frame.write_csv(buffer)
|
||||
return buffer.getvalue()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue