Skip to content

Testing Google Sheets to Polar Dataframe developer experience.

License

Notifications You must be signed in to change notification settings

oceanicsdotio/polar-sheets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

polar-sheets

Testing Google Sheets to Polars DataFrame developer experience.

This repository demonstrates how to use Pixi for Python environment management and provides an example of pulling data from Google Sheets into a Polars DataFrame.

Prerequisites

Getting Started

1. Install Dependencies

Pixi will automatically install all required dependencies specified in pixi.toml:

pixi install

This will create a virtual environment with:

  • Python 3.10+
  • Polars (for efficient DataFrame operations)
  • gspread (for Google Sheets API access)

2. Set Up Google Sheets Authentication

To access Google Sheets, you need to set up a Google Service Account:

  1. Go to Google Cloud Console
  2. Create a new project (or select an existing one)
  3. Enable the Google Sheets API
  4. Create an API Key
  5. Make your Google Sheet publicly visible

For more details, see gspread authentication documentation.

3. Run the Example

Run the example script using Pixi:

pixi run main

Example Code

The main.py script demonstrates:

  • Connecting to Google Sheets using a URL
  • Fetching data from a worksheet
  • Converting the data to a Polars DataFrame
  • Basic DataFrame operations

About Pixi

Pixi is a modern package management tool that:

  • Provides fast, reproducible environments
  • Works across platforms (Linux, macOS, Windows)
  • Uses conda-forge packages
  • Manages both Python and system dependencies
  • Creates isolated environments automatically

About Polars

Polars is a fast DataFrame library that:

  • Offers better performance than pandas for large datasets
  • Uses Apache Arrow for memory efficiency
  • Provides a clean, expressive API
  • Supports lazy evaluation for query optimization

License

See LICENSE file for details.

About

Testing Google Sheets to Polar Dataframe developer experience.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages