Skip to main content

Read/write gspread worksheets using pandas DataFrames

Project description

gspread-dataframe

If you have pandas (>= 0.14.0) installed, the gspread_dataframe module offers get_as_dataframe and set_with_dataframe functions to return a worksheet’s contents as a DataFrame object, or set a worksheet’s contents using a DataFrame.

import pandas as pd
from gspread_dataframe import get_as_dataframe, set_with_dataframe

df = pd.DataFrame.from_records([{'a': i, 'b': i * 2} for i in range(100)])
set_with_dataframe(worksheet, df)

df2 = get_as_dataframe(worksheet)

Installation

Requirements

Python 2.6+ or Python 3+

From PyPI

pip install gspread-dataframe

From GitHub

git clone https://github.com/robin900/gspread-dataframe.git
cd gspread-dataframe
python setup.py install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gspread-dataframe-1.0.0.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

gspread_dataframe-1.0.0-py2.py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page