Sign inGet started
← Back to all guides

How to work with BigQuery in Jupyter

By Nick Barth

Updated on March 6, 2024

To work with BigQuery in Jupyter notebooks, start by installing the `google-cloud-bigquery` library using `pip`. You can do this directly in your Jupyter notebook by executing a cell that contains `!pip install google-cloud-bigquery`.

Next, import the library with `from google.cloud import bigquery`. Then, set up a client with `client = bigquery.Client()`, ensuring that you have authenticated with the Google Cloud platform and set up your service account key properly.

You can then use the client object to execute queries and interact with your BigQuery datasets by using methods like `client.query("your-query-here")` and further manipulate the returned data for analysis within your Jupyter environment.

Nick Barth

Product Engineer

Nick has been interested in data science ever since he recorded all his poops in spreadsheet, and found that on average, he pooped 1.41 times per day. When he isn't coding, or writing content, he spends his time enjoying various leisurely pursuits.

Follow Nick on LinkedIn and GitHub

That’s it, time to try Deepnote

Get started – it’s free
Book a demo

Footer

Product

  • Integrations
  • Pricing
  • Documentation
  • Changelog
  • Security

Company

Comparisons

Resources

  • Privacy
  • Terms

© Deepnote