A package to easily open an instance of a Google spreadsheet and interact with worksheets through Pandas DataFrames.
Project description
gspread-pandas
===============================
version number: 0.2
author: Diego Fernandez
Overview
--------
A package to easily open an instance of a Google spreadsheet and interact with worksheets through Pandas DataFrames.
When going to and from DataFrames, it can nicely handle headers and indexes.
Installation / Usage
--------------------
To install use pip:
$ pip install gspread-pandas
Or clone the repo:
$ git clone https://github.com/aiguofer/gspread-pandas.git
$ python setup.py install
Get OAuth 2.0 client ID info from [Google](https://console.developers.google.com/apis/credentials) and download JSON as `~/.google/google_secret.json`
Contributing
------------
TBD
Example
-------
```
import pandas as pd
from gspread_pandas.client import Spread
file_name = "http://www.ats.ucla.edu/stat/data/binary.csv"
df = pd.read_csv(file_name)
# 'Example Spreadsheet' needs to already exist and your user must have access to it
spread = Spread('example_user', 'Example Spreadsheet')
# This will ask to authenticate if you haven't done so before for 'example_user'
# Display available worksheets
spread.sheets
# Save DataFrame to worksheet 'New Test Sheet', create it first if it doesn't exist
spread.df_to_sheet(df, index=False, sheet='New Test Sheet')
```
===============================
version number: 0.2
author: Diego Fernandez
Overview
--------
A package to easily open an instance of a Google spreadsheet and interact with worksheets through Pandas DataFrames.
When going to and from DataFrames, it can nicely handle headers and indexes.
Installation / Usage
--------------------
To install use pip:
$ pip install gspread-pandas
Or clone the repo:
$ git clone https://github.com/aiguofer/gspread-pandas.git
$ python setup.py install
Get OAuth 2.0 client ID info from [Google](https://console.developers.google.com/apis/credentials) and download JSON as `~/.google/google_secret.json`
Contributing
------------
TBD
Example
-------
```
import pandas as pd
from gspread_pandas.client import Spread
file_name = "http://www.ats.ucla.edu/stat/data/binary.csv"
df = pd.read_csv(file_name)
# 'Example Spreadsheet' needs to already exist and your user must have access to it
spread = Spread('example_user', 'Example Spreadsheet')
# This will ask to authenticate if you haven't done so before for 'example_user'
# Display available worksheets
spread.sheets
# Save DataFrame to worksheet 'New Test Sheet', create it first if it doesn't exist
spread.df_to_sheet(df, index=False, sheet='New Test Sheet')
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gspread-pandas-0.2.tar.gz
(5.4 kB
view hashes)
Built Distributions
gspread_pandas-0.2-py3.6.egg
(15.0 kB
view hashes)
gspread_pandas-0.2-py2.7.egg
(10.9 kB
view hashes)
Close
Hashes for gspread_pandas-0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ec9701250b6dff6d7bd958cc16935842514fc023646a9e348bdc3b73fb9b305 |
|
MD5 | 7afd13cdac7762063d08f7ae18f81161 |
|
BLAKE2b-256 | cac4163442cc3d8436be533b2adc38d771d856c9c9416dc97f01aa291e0a6f32 |