How to increase row output limit in DuckDB in Python?

1.3k views Asked by At

I'm working with DuckDB in Python (in a Jupyter Notebook). How can I force DuckDB to print all rows in the output rather than truncating rows? I've already increased output limits in the Jupyter Notebook.

This would be the equivalent of setting .maxrows in the CLI, but I can't find how to do this in Python.

1

There are 1 answers

0
AlexMonahan On BEST ANSWER

There is not currently a way to increase that maxrows parameter in Python. I would recommend outputting your data as a Pandas or Arrow dataframe and using the flags that those libraries support to decide what is shown.

Ex:

my_df = duckdb.sql("select 42").df()