Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Remove redundant empty-frame guard in FocusCsvSerializer

Harshit28j9e623ceaff0c
diff --git a/litellm/integrations/focus/serializers/csv.py b/litellm/integrations/focus/serializers/csv.py
index 30e7f3283db..320c99517d6 100644
--- a/litellm/integrations/focus/serializers/csv.py
+++ b/litellm/integrations/focus/serializers/csv.py
@@ -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()