-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow us to set how uploaded data should be interpreted. #44
Comments
Yeah for now I have been having a duplicate sheet with =VALUE(Raw_Sheet!H2) and so on. This would be a great addition. Something like a dtype parameters that pandas has would be great. |
@Ctilhs thank you for creating an issue, that would be great if you could submit a PR with proposed changes. Otherwise I'll work on this as soon as I'll have time. |
Any updates on this? |
Are the authors alive? I wanted this as well, shall I create a pr? |
Hi @varunjain3 I don't actively support the lib anymore, if you will open a pr with tests - I'll review and bump the lib version |
Thanks for the prompt reply, I’ll do the needful, also are there any alternatives you found for the same project? |
Not really, df2gspread mainly leverages https://github.com/burnash/gspread, which is update regularly from what I can see, so you may built small abstraction layer to fulfil your needs just on top of that. |
I'd suggest abandoning (that's what we did), when an entire library can be replaced with a couple lines of monkey patching in the actively maintained
Or use gspread-dataframe instead. |
From what I understand, by default when we use the upload() from df2gspread, dataframe values are converted to string then upload is performed.
I struggled with it when I had to upload values which were prices. Same situation if I would like them to stay as digits after update, without my interaction in google docs.
Simple fix.
In upload() add argument
value_input_opt='RAW'
df2gspread/df2gspread/df2gspread.py
Lines 24 to 26 in 01bc46d
And in three function calls
value_input_option=value_input_opt
df2gspread/df2gspread/df2gspread.py
Line 126 in 01bc46d
df2gspread/df2gspread/df2gspread.py
Line 134 in 01bc46d
df2gspread/df2gspread/df2gspread.py
Line 147 in 01bc46d
From: developers.google.com
What we get? Now in upload we could set parameter
value_input_option='USER_ENTERED'
, so when we upload digits they will be automatically parsed as numbers.If we will not specify
value_input_option
in upload() it will stay default as'RAW'
so data will be uploaded as it is now.Not sure is it related?: #41
It's my first time ever adding Issue at github. I will gladly accept advice if I should improve something.
The text was updated successfully, but these errors were encountered: