question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dropping commas from cells after updating to version 4.0.0

See original GitHub issue

Important: Please do not post usage questions here. To get a quick response, please ask a question on Stack Overflow using gspread tag. See existing questions: https://stackoverflow.com/questions/tagged/gspread


Describe the bug A clear and concise description of what the bug is. After Aug 1 update it seems that cells with comma are being returned without comma. Major issue for our application.

To Reproduce Steps to reproduce the behavior:

  1. Read spreadsheet with comma in some cells of the column. “X,Y” becomes “XY”
  2. There is no way to restore comma
  3. Existing utilities are not working correctly

Expected behavior A clear and concise description of what you expected to happen. “X,Y” should be returned as “X,Y”

Code example* If applicable, provide a code example to help explain your problem.

Screenshots If applicable, add screenshots to help explain your problem.

Environment info:

  • Operating System [e.g. Linux, Windows, macOS]:
  • Python version
  • gspread version

Stack trace or other output that would be helpful

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
lavigne958commented, Aug 5, 2021

Hi @LevaL59 I found the issue.

In latest released we introduced a quick, in spreadSheet any value returned is a string, we have a function that take that string and tries to convert it to a number so users can work with int or floats in python. This function replaces comma , in the string (spreadsheet sometimes introduces comma to separate thousands, like 1,000) but it does so on the actual values.

I’ll make a PR to fix it.

0reactions
lavigne958commented, Aug 7, 2021

@LevaL59

I plan to make some major changes in the code format, re-organize files etc, so I made a quick release for your issue. you can now use version v4.0.1 which includes the bugfix for your issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trying to remove commas and dollars signs with Pandas in ...
My solution is to typecast the column to string, replace these symbols one by one then cast it back to appropriate numerical formats....
Read more >
How to Remove Comma in Excel (from Text and Numbers)
Want to quickly remove comma from cells in Excel? Here are some really simple (& quick) methods to remove comma from numbers and...
Read more >
How to Remove Comma in Excel (from Numbers and Text ...
In this video, I will show you how easily remove commas from numbers and from text strings in Excel.
Read more >
Numeric column no longer accepts formatted number input
I just had a meeting with our CTO and I need to share a very important update on this topic. We have tracked...
Read more >
SharePoint Online: Number Column without Comma
Navigate to your list, Select the little drop-down in the target column, Choose “Column Settings” >> Select “Format this column”.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found