Install & Compatibility
Where this runs
tested against v1.0.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 2.816s · 195.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 11.1s · import 2.626s · 188MB
196MB installed
● package 196MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
df2gspread
✓ from df2gspread import df2gspread
✗ import df2gspread
Direct import misses the nested module
upload
✓ from df2gspread import df2gspread; df2gspread.upload(...)
✗ from df2gspread import upload
upload is not a top-level function
Upload a pandas DataFrame to an existing Google Sheet using spreadsheet key and worksheet name.
import pandas as pd
from df2gspread import df2gspread
# Create a DataFrame
df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
# Upload to Google Sheets (requires credentials)
df2gspread.upload(df, '1BxiMVs0XRA5nFMdKv_BdBZTgE3e8eFTe_7fGq6WpJ6E', 'Sheet1', credentials=None)
print('Uploaded successfully')
Errors
Common errors & fixes
AttributeError: module 'df2gspread' has no attribute 'upload'
Incorrect import: using 'import df2gspread' then 'df2gspread.upload'
fixUse 'from df2gspread import df2gspread' then 'df2gspread.upload'
ImportError: No module named 'oauth2client'
oauth2client is no longer installed by default
fixInstall oauth2client: pip install oauth2client, or switch to google-auth
Upgrade
Version history
1.0.4latest on PyPI · released Jan 3, 2019
Audit
Dependencies
pandasrequiredDataFrame input
gspreadrequiredGoogle Sheets API interaction
oauth2clientoptionalAuthentication (deprecated in favor of google-auth)