Pardis Bagheri
Pardis Bagheri

Reputation: 11

How can I get more than records in Jupyter?

My query records in Clickhouse has about 60m records but when I run in Jupyter it loads only 5000 records. How can I have all records in Jupyter?

I need all data of the query result and then make a bar chart based on whole data.

Upvotes: 0

Views: 46

Answers (2)

Jeremy
Jeremy

Reputation: 66

You can adjust the settings to display all rows in your DataFrame:

with pd.option_context('display.max_rows', None):
    display(df)

This will apply the setting only within the block, so you don't have to worry about affecting other parts of your notebook.

If you want to remove the row limit for all DataFrames in your session:

pd.options.display.max_rows = None

Upvotes: 0

Sichez
Sichez

Reputation: 29

You may want to check https://clickhouse.com/docs/en/sql-reference/statements/select/offset for paginated queries to load all data.

Here is our documented example on JupySQL with ClickHouse: https://clickhouse.com/docs/en/integrations/jupysql

You may also want to check if your Jupyter configuration or client configuration has any limit settings/truncate settings to limit the output size.

Upvotes: -1

Related Questions