o3-2025-04-16· OpenAI
LMArena Human Preference 140K
Set numbers of rows to show in polars df
- User
Set numbers of rows to show in polars df
- Assistant
In Polars you control how many rows (and columns, width, etc.) are shown by changing the global formatting options that live in
pl.Config.
Just set the value once and every subsequentprint(df)(or the automatic repr in a notebook / REPL) will respect the new limit.pythonimport polars as pl # show at most 20 rows whenever a DataFrame is printed pl.Config.set_tbl_rows(20) df = pl.DataFrame({"col": range(50)}) print(df) # ⇢ will show 20 rows
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.