Repository navigation
Releases
v4.2.1
Documentation only — no code changes.
The README is the PyPI description, so this release is how the refreshed version reaches the project page.
- Removed the troubleshooting section for Rodeo, an editor discontinued years ago whose link no longer resolves
- Google's setup steps said API Manager, renamed APIs & Services some years back
- The Read the Docs link pointed at a site still serving the 3.2.2 docs from 2023. That project is still owned by the original author and builds from his repository, so it can't be fixed from here yet — the README now says so and points at itself and
docs/meanwhile - Added the requirements up front (Python 3.9+, gspread 6, pandas 2 or 3), CI and Python-version badges, and the 4.0–4.2 options in the feature list
- Docs build without Sphinx warnings
v4.2.0
Two feature requests that had been open for years.
Added
Create a spreadsheet inside a folder (#95)
Spread("Usecase", create_spread=True, folder_id="0AMdkqF6BUiexUk9PVA")Only applies when creating; opening an existing spreadsheet ignores it. A path can't name every folder — one shared with you may not appear in your own directory tree — so an id is the handle, same as move_file in 4.0.0. Get one from Client.find_folders.
Reorder worksheets (#55)
spread.reorder_sheets(["summary", "raw", 0])By name, index or Worksheet. Anything left out keeps its position relative to the rest. Naming an unknown sheet, or the same sheet twice, raises before anything is sent — a half-applied order is worse than none.
Both parameters are added at the end of their signatures, so existing positional callers are unaffected.
Fixed
Two Sphinx errors in add_permission's docstring, where continuation lines read as unexpected indentation and the block rendered wrong. The docs now build with no errors.
Verified
166 passed on Python 3.9 through 3.13, against pandas 2.3.3 and 3.0.5.
v4.1.0
Two bugs that failed silently — no exception, no log, just the wrong result.
Fixed
clear_sheet left frozen rows and columns populated (#97)
Clearing works by shrinking the sheet, which deletes the values, then growing it back. A sheet can't shrink past its frozen block, so that block survived and only A1 was cleared. With two frozen rows and one frozen column, five cells silently kept their old values. Sheets with nothing frozen are unaffected.
creds_dir was documented in two places and implemented in neither (#104)
get_config said it sets creds_dir; it didn't. get_creds said it reads config['creds_dir']; it didn't. So pointing conf_dir somewhere custom left credentials in the default location, and the workaround the docstring itself suggested did nothing at all.
conf = gspread_pandas.conf.get_config(conf_dir=".", file_name="credentials.json")
conf["creds_dir"] # -> ./credsExplicit creds_dir= beats config, which beats the default. Credentials already in the old location are still read, so upgrading won't send anyone back through an OAuth flow.
Note
get_config now returns an extra key. That's why this is minor rather than patch — code asserting on the shape of that dict will see it.
Verified
155 passed on Python 3.9 through 3.13, against pandas 2.3.3 and 3.0.5.
v4.0.0
First release under new maintenance. The library now works with current gspread, and reading a sheet no longer leaves the awkward parts to the caller.
Breaking
- Requires gspread 6.
Client.authis nowClient.http_client.auth, following gspread's move of HTTP execution into a separateHTTPClient. - Requires Python 3.9 and pandas 2.0. gspread 6 needs 3.8 and pandas 2 needs 3.9, so the older versions the package advertised could not have worked.
Added
df_to_sheet(..., append=True)adds rows below the data already in a sheet, matching your columns to the headers that are there. A reordered or renamed frame lands in the right place instead of being written positionally. (#86)sheet_to_df(..., convert_types=True)gives columns their real dtypes instead of returning everything asobject. Strict: a column converts only when every non-empty value converts cleanly, so one strayN/Aleaves the column as text rather than quietly nulling that row. (#18)sheet_to_df(..., detect_layout=True)finds where the table starts, for sheets that open with a report title or a blank row.-1forunformatted_columns/formula_columns, meaning every column. (#56, thanks @ChristophBoerlin)folder_idonClient.move_fileandSpread.move, for destinations a path can't name. (#48, thanks @dtquandt)
All three of the first group work with no configuration and no new dependencies. Setting GSPREAD_PANDAS_AI_API_KEY additionally lets them call an OpenAI-compatible model for the harder cases — renames that don't look alike, stacked headers, types that only make sense from a column's name. The model is only ever asked for a small structured answer, nothing it returns is executed, and anything naming a column, header or type that isn't really there is discarded.
Fixed
- The rate-limit auto-retry had silently stopped retrying. It matched
"RESOURCE_EXHAUSTED"againststr(APIError), and gspread 6 no longer puts the status field there. It now reads the structured error. Client.expiryandhttp_client.login()raisedAttributeError. gspread only records credentials when it builds the session itself, and this package always hands one in.- No more pandas
FutureWarningabout silent downcasting when a sheet has a column of blanks. (#102, thanks @IvanKaramazov)
Verified
140 passed on Python 3.9 through 3.13, against both pandas 2.3.3 and 3.0.5.
Published by trusted publishing (OIDC) — no API token involved.
v3.3.0
v3.2.3
v3.2.2
Commits
- 8482fef: Drop python 3.5 from tox (Diego Fernandez)
- 92641a6: Bump version: 3.2.0 → 3.2.1 (Diego Fernandez)
- fe08a7f: Use PAT for tagged-release workflow (Diego Fernández Giraldo)
- 2f8c035: Update CI descriptions (Diego Fernandez)
- 029b103: Update changelog (Diego Fernandez)
- 34505c1: Bump version: 3.2.1 → 3.2.2 (Diego Fernandez)