All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Limit gspread version to < 6.0
- Add
merge_index
option forSpread.df_to_sheet
- Update CI and its documentation
- Don't use the deprecated pandas option
inplace = True
- Fix hanging auth test
- Example in docs
- Fix for early pandas 1.0 is no longer necessary
- OOB auth flow was removed from google-auth, see here. Fixed it by running local server to listen for token.
- Frozen column field in
gridProperties
changed fromfrozenColCount
tofrozenColumnCount
- Potential issue with resizing in
clear_sheet
- Section about resizing issues to README
- Remove deprecated param raw_column_names
- Pipeline changes
- Upgrade gspread to >= 5
- BREAKING: Removed Python 2.7 support
- Removed Travis pipeline
- CI pipeline using Github Actions
- Fix gspread 5 incompatibility by blocking requirements
- Switch to pycryptodome instead of pycrypto to fix tests
- Switch from future to six for python 2 compat
- Fix docstring about default sheet param for open
- Fix numpy deprecation warning about numeric-style types
- Fix google quota exceed retry
- Added ability to use shared drives
- Fix dtype issues for numeric+null values for pandas 1.0
- Fix auth within Colab
- Ensure we respect XDG_CONFIG_HOME
- Use current dir if no $HOME env var is set (in some cloud environments and Colab)
- Use Path for various paths in conf.py
- Added a section explaining the main concepts of
Gspread-Pandas
to the docs.
- Fixed the auto-retry when encountering the 100 second quota limit (thanks @rodelrod).
- All
Client
objects should now be monkeypatched to retry on 100 s quota error. Before it was only those within aSpread
instance.
- When a
Spread
is opened, it will now open the first worksheet by default.
- Added
formula_columns
andunformatted_columns
as options toSpread.sheet_to_df
to allow usage of ValueRenderOption for specific columns. - Added test for python 3.7 and 3.8 in travis
- Bug with certain functions when index=False
- Bug when all columns are
raw_columns
- Fixed travis tests
raw_column_names
is deprecated in favor ofraw_columns
. It will be removed in v3.
- bumpversion config now in setup.cfg
- Docstrings now use docformatter format
- Added
Spread.add_permission
to differentiate adding a single permission vs adding multiple permissions.
- Ensure license is packaged with sdist
- Unified and simplified project and test configuration settings
- Added test for open_sheet
- Client directories property now works as expected
- Various fixes for tests
- Tox must run correctly before being able to push a new tag
- Fixed import in Spread after refactor, oops! should have ran tests
- Client now has an optional
load_dirs
param which default toFalse
- BREAKING: Refactored
Spread
into its own file. If you were importing likefrom gspread_pandas.client import Spread
you will need to change tofrom gspread_pandas.spread import Spread
. - Directories and paths are no longer loaded by default. However, if you try to use any functionality that requires it, it'll load it at that point.
- If a file doesn't have
parents
it'll no longer break (thanks @shredding) (#29) - $XDG_CONFIG_HOME should now be respected
- If you don't have Drive API access in the scope, it should now still work and print a message instead
- Test python 3.7, Windows, and MacOS
- You can now iterate over worksheets like:
for sheet in spread
Spread.df_to_sheet
can now flatten multi-level headers using theflatten_headers_sep
param- Add ability to set permissions on spreadsheets
- Add ability to create and move folders and spreadsheets
- A session can now be passed directly to a
Client
- A
raw_column_names
param toSpread.df_to_sheet
to force specific columns to be sent to the Google Sheets API as RAW input so it doesn't get interpreted as a number, date, etc.
- BREAKING: Removed
start/end_row/col
params from add_filter - BREAKING: Removed
user_creds_or_client
param from Spread - BREAKING: Removed
user_or_creds
param from Client
- The
credentials
param is now calledcreds
everywhere - Test suite is now a lot more robust
- Use google-auth instead of the now deprecated oauth2client library. This moves the retry code into that library.
- Default config will now be in
C:\Users\<user>\AppData\gspread_pandas
on Windows
- Things should now work when passing a
Worksheet
object toSpread.open
- Passing 0 to
sheet`
param in any function should work now - When using multi-row column headers in a spreadsheet, the index name should now be better identified
- Spread;update_cells should now work when passing a single cell value
- When start != 'A1', freeze_rows/headers should now correctly freeze the right amount of rows/headers so the index and columns are frozen
- Function to merge_cells
- Function to unmerge_cells
- Option to merge_headers in df_to_sheet
- Retry when exceeding the 100s quota
- Fix passing 0 for freeze_index or freeze_headers. This essentially "unfreezes"
- When the index has no name and you have a multi-level header, it will no longer fill in "index" as the index header
- Spread will no longer use the 'user_creds_or_client' param in v2. Instead, it will have optional 'credentials', 'client', and 'user' params. If creds or a client are passed, the user will be ignored. Otherwise, it'll use the user, which will default to "default"
- Client will no longer use the 'user_or_creds' param in v2. Instead, it will have optional 'credentials' and 'user' params. If creds passed, the user will be ignored. Otherwise, it'll use the user, which will default to "default"
- Spread.add_filter will be standardized to use 'start' and 'end' like other functions and the start/end_row/col are deprecated and will be removed in v2
- Exceptions are no longer raised while handling another exception. This should prevent the "During handling of the above exception, another exception occurred" message
- When opening a new Spreadsheet, the SpreadsheetNotFound exception will no longer be a "catchall" for any errors. If an error other than actually not finding the Spreadsheet occurs, it'll be raised.
- Default value for the user param in util.get_config was changed to "default"
- Fix passing only one of freeze_index or freeze_headers = True
- Fixed __version__ string for bumpversion using black
- Add config files and pre-commit hooks for isort, black, and flake8
- Add config files for isort, black, and flake8
- Fixed clear_sheet when there are frozen rows/cols
- Small fixes in README
- Changed from reST docstrings to numpy docstrings
- Updated README to include more in contributing section
- Added unit tests for util
- Fix parse_df_col_names when df has a multi-index
- Fix parse_sheet_index when using last column as index
- Fix fillna when using categorical variables
- Fix issue with basestring usage
- Remove Python 3.4 from travis tests
Spread.clear_sheet
now doesn't resize to 0 since V4 is much more efficient at making batch updates. This should help prevent formulas that point to these sheets from breaking.
- Now works with gspread 3.0
- Spread.freeze is working again
- Moved a lot of the credential handling into functions in gspread_pandas.conf
- New
get_creds
function allows you to getOAuth2Credentials
and pass them in to aClient
orSpread
- Some functions were moved to
gspread_pandas.util
- New function
Spread.add_filter
created so that you can add filters to worksheets - New param
add_filter
added toSpread.df_to_sheet
to add a filter to uploaded data
- Added limit to gspread version since 3.0 broke gspread-pandas
- Change ValueInputOption to USER_ENTERED so dates and numbers are parsed correctly in Google Sheets
- Basic initial test
- Some dependency changes
- Travis deploy will only happen on python 3.6
- Changes to reduce number of fetch_sheet_metadata calls
- Replace pypi-publisher with twine in dev reqs
- Change download url, now it should match the tags from bumpversion
- There is now a separate
Client
class that extends the gspread v4 Client class and adds some functionalty. This includes a monkeypatche and hacky workarounds for gspread 2.0 issues. Once they get fixed upstream I need to remove these.
- Now supports gspread 2.0 which uses Spreadsheets V4 API, this provides much better performance and reliability. Some APIs might have changed.
- No longer need to chunk update requests, and range requests can use larger chunks
- Some code improvements enabled by gspread 2.0
- Removed deprecated params and functions
- Set up correct credentials for travis pypi push
- Test on multiple versions using tox
- Enable travis-ci
- Remove dir accidentally pushed by build
- Moved dev requirements into requirements_dev.txt
- Now using bumpversion for version management
- Minor updates to README
- Documentation now at Read The Docs
- Minor code changes to please flake8
- Deleted update_pypi.sh as releases are now handled by travis
- Remove code accidentally pushed by build
- Added dependency version limit for gspread; will remove in next version
- README example now points to the correct URL (thanks @lionel)
- Calling parse_sheet_headers on an empty sheet doesn't break anymore (thanks @taewookim)
- You can now use service account credentials in the config (thanks @marcojetson)
- Always return an Index object from parse_sheet_headers
- Fix sheet_to_df when headers are present with no data
- Minimum Pandas version .20 now required
- When there are merged cells outside the data range, an exception is no longer thrown.
- Cast keys() to a list to fix Python 3 compat
- Added
fill_value
option to df_to_sheet
- Different application type credentials can be used now
- Some safeguards to prevent certain exceptions
- df_to_sheet won't fail when categorical columns have nulls
- Force gspread sheets refresh when refreshing sheets
- Worksheet object can now be passed it to most functions with
sheet
param
- Added
url
property for easy linking
- Fixed retry for _retry_get_all_values
- Ensure sheet matadata is refreshed after sheet changing activitiesthrough use of a decorator
- Retry when calling
get_all_values
- More robust way to get index when a new sheet is created
- Added function to freeze rows/columns to
Spread
- Added
freeze_index
andfreeze_headers
flags todf_to_sheet
- Don't re-size again when using
replace=True
- Switch away from deprecated
gspread
functions - Make functions in
util
non-private
- Prevent error when index > number of columns in
sheet_to_df
- Added
create_spread
andcreate_sheet
params forSpread
class. This enables creating a spreadsheet or a worksheet during opening. This will require re-authenticating in order to use it
- If using multi-level headings, heading will be shifted up so the top level is not a blank string
- Some functions that don't depend on
self
were moved intoutil.py
- The
headers
param insheet_to_df
was deprecated in favor ofheader_rows
- I introduced some small bugs with the v4 api changes when a sheet is not found, they now work as expected even when a new sheet is created
- The list of sheets is now refreshed when one is deleted
- Add Sheets API v4 client to
self.clientv4
- Merged cells now all get the right value in
sheet_to_df
- You can now pass
replace=True
when a sheet has frozen rows/cols
- Minor change to README
- Added note about
EOFError
when verifying Oauth inRodeo
- Add retry method for
sheet.range
to work around 'Connection Broken' error
- Fixed clearing only rows with
clear_sheet
- Only clear up to first row in
clear_sheet
so that data filters will persist - Moved default config from
~/.google/
to~/.config/gspread_pandas
- Allow passing index
0
toopen
- Fixed changelog
- Added troubleshooting for
certifi
issue inREADME
- Only catch
SpreadsheetNotFound
exceptions when opening a spreadsheet
- Added optional
create
param toopen_sheet
to create it if it doesn't exist - Added optional
start
param todf_to_sheet
, will take tuple or address as str
- Improved docs, changed to
rst
- Made some variables private
- Improved
__str__
output - Switch to using exceptions from
gspread
spread
param is now required foropen
- When current sheet is deleted,
self.sheet
is set toNone
- Improved versioning, switched to Semantic Versioning
- Fixed chunk calculation in Python 3
- Sheet names are case insensitive, fixed
find_sheet
- Deprecate
open_or_create_sheet
function in favor ofcreate=True
param foropen_sheet
- Deprecate
start_row
andstart_col
indf_to_sheet
in favor ofstart
param
- Add
__repr__
and__str__
to show the active - Add user's email as a property to Spread. I recommend deleting existing Oauth credentials and re-creating them with new permissions
- Allow importing with:
from gspread_pandas import Spread
- Added
CHANGELOG.md
- Restrict scope to only necessary endpoints
- Add retry for updating cells in case an error occurrs
- Minor changes to
README.md
- Fixed the use of
start_row
> 1
- Add python 3 build to
update_pypi.sh
script
- Oauth flow now uses correct properties
- Made python 3 compatible using future
- Change defaults in
sheet_to_df
to include index and header - Raise error when missing google client config file
- Improve decorators more using
decorator.decorator
- Pypi update script
- Improve decorators using
functools.wraps
- Add
ensure_auth
decorator to most functions to re-auth if needed - Chunk requests to prevent timeouts
- Improved
clear_sheet
by resizing instead of deleting and re-creating
- Code migrated
- Example usage in README
- Add requirements
- README
- initial code migrated