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.4
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
------------
```
$ git clone https://github.com/aiguofer/gspread-pandas.git && cd gspread-pandas
$ pip install -e ".[dev]"
```
TBD
Example
-------
```python
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.4
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
------------
```
$ git clone https://github.com/aiguofer/gspread-pandas.git && cd gspread-pandas
$ pip install -e ".[dev]"
```
TBD
Example
-------
```python
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.4.tar.gz
(5.9 kB
view hashes)
Built Distributions
gspread_pandas-0.4-py3.6.egg
(16.3 kB
view hashes)
gspread_pandas-0.4-py2.7.egg
(12.2 kB
view hashes)
Close
Hashes for gspread_pandas-0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc1f5faf02135164a811087558621559e414cfb1af683198956e7386e3941e5c |
|
MD5 | 6cdbc8cb1adda835334ae71ae95851ac |
|
BLAKE2b-256 | 03fdbcb383ad7e307de4e46bcce23f10fe274781bef70378c96e65ad9a281484 |