Questions tagged [df2gspread]

df2gspread provides possibility to transport table-data between Google Spreadsheets and Pandas DataFrame for further management or processing.

It can be useful in all cases, when you need to handle the data located in Google Drive.

Install

pip install df2gspread

Usage

import pandas as pd

from df2gspread import df2gspread as d2g


d = [pd.Series([1., 2., 3.], index=['a', 'b', 'c']),
    pd.Series([1., 2., 3., 4.], index=['a', 'b', 'c', 'd'])]
df = pd.DataFrame(d)

# use full path to spreadsheet file
spreadsheet = '/some/folder/New Spreadsheet'
# or spreadsheet file id
# spreadsheet = '1cIOgi90...'

wks_name = 'New Sheet'

d2g.upload(df, spreadsheet, wks_name)
# if spreadsheet already exists, all data of provided worksheet 
# (or first as default)
# will be replaced with data of given DataFrame, 
# make sure that this is what you need!
3 questions
0
votes
0 answers

GSpread function became super slow

I have a basic routine of accessing data on my Google Spreadsheet via python. It has always worked well and super fast (1 sec). Out of nothing, w/o changing anything on my code, now it takes 10-15 minutes to perform this simple task. All it does is…
0
votes
0 answers

Exporting pandas data frame to google sheets with df2gspread returns Error: Setting a MultiIndex dtype to anything other than object is not supported

I'm trying to upload a df to google sheets using the df2gspread module. The data frames looks like this: Org Name TSTAcme TSTExample Total Cost Net Revenue Revenue Cost Net Revenue Revenue Cost Net…
dev_998
  • 44
  • 3
0
votes
0 answers

df2gspread is missing an attribute to upload a pandas dataframe to google sheets, is there a workaround?

I'm trying to upload a pandas dataframe to google sheets, and I'm following this step by step guide:https://towardsdatascience.com/using-python-to-push-your-pandas-dataframe-to-google-sheets-de69422508f I'm using the df2gspread to upload the…
Aki
  • 137
  • 1
  • 4
  • 17