Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sheetconnect

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sheetconnect

Simple get data from Google sheet in form of Pandas dataframe

  • 1.0.2
  • PyPI
  • Socket score

Maintainers
1

Google Sheets to DataFrame

This Python module provides a simple interface to connect to Google Sheets and retrieve data as a pandas DataFrame. It uses the gspread library to handle Google Sheets API interactions and pandas for data manipulation.

Prerequisites

Ensure you have the following Python libraries installed:

  • gspread
  • pandas
  • oauth2client

You can install them using pip:

pip install gspread pandas oauth2client

Google Sheets API Setup

  1. Go to the Google Cloud Console.
  2. Create a new project (or select an existing one).
  3. Enable the Google Sheets API and Google Drive API for the project.
  4. Create credentials for a Service Account and download the JSON key file.
  5. Share your Google Sheet with the email address in the JSON key file.

Usage

  1. Save your Service Account credential JSON file in your project directory.

  2. Use the Connect class to fetch data from your Google Sheet:

from sheetconnect import Connect

credential = 'path/to/your/credential.json'
sheet = 'Your Google Sheet Name'
sheet_name = 'Sheet1'

dataframe = Connect.GetDF_Sheet(credential, sheet, sheet_name)
print(dataframe)

Replace 'path/to/your/credential.json', 'Your Google Sheet Name', and 'Sheet1' with your actual file path, Google Sheet name, and worksheet name.

Acknowledgements

  • gspread - Google Sheets Python API
  • pandas - Data analysis and manipulation library
  • oauth2client - OAuth 2.0 client library

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc