我在使用 Dict 对象没有属性“select_dtypes”时遇到问题
I have a dataframe that looks like the following....
{ 'miley cyrus' :{'top': query value
0 cyrus tours 100
1 cyrus update 8
2 miley and chris 6 }}
When I attempt to export to Google Sheets, I get the error above. I have used this following code that worked fine up until now.
Import pygsheets
gc = pygsheets.authorize(service_file = 'mysecret.json'
df = pd.DataFrame()
df = related_queries
sh = gc.open('Google Worksheet')
wks = sh[0]
wks.set_dataframe(df,(1,1))
I know the issue isn't connecting to GoogleSheets as I have connected to it in the past and exported DF with the code above .... there is something odd about the dataframe being in brackets {{ }} that I think is throwing off the code above. My question is how do i resolve this to print out the df like i have in the past.