itholic opened a new pull request #33907:
URL: https://github.com/apache/spark/pull/33907


   ### What changes were proposed in this pull request?
   
   This PR proposes adding `thousands` argument to `ps.read_csv`.
   
   csv_file:
   ```csv
   name;age;job;money
   Jorge;30;Developer;10,000,000
   Bob;32;Developer;-2,000,000
   John;29;Developer;
   ```
   
   before:
   ```python
   >>> ps.read_csv(path, sep=";").money
   0    10,000,000
   1    -2,000,000
   2          None
   Name: money, dtype: object
   ```
   
   after:
   ```python
   >>> ps.read_csv(path, sep=";", thousands=",").money
   0    10000000.0
   1    -2000000.0
   2           NaN
   Name: money, dtype: float64
   ```
   
   ### Why are the changes needed?
   
   We should support the API same as pandas, as much as possible.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, now the `thousands` argument is supported for `ps.read_csv`.
   
   ### How was this patch tested?
   
   Unittest


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to