You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DataFrameCsvReader should ignore spaces after commas in CSV files #116
I think the result should be trimmed from both sides.
Because sometimes even data inside the same file is inconsistent.
In most cases, CSV files have data separated by commas, TSV files separate it by tabs.
But then some people add extra spaces:
Oleks, 25, true
And others don't:
Oleks,25,true
It can be even more troublesome when there are tabs and the space can be invisible.
And then the users will be running into all kinds of problems.
For example, when ' 25' can not be parsed as a number because there is a space.
So I think that it's better to trim whitespace characters from left and right when reading from a CSV.
(but only unless quotes are used! Because if a file contains something like "Oleks", " 25 " then maybe clients want those spaces inside quotes)
Activity
AtharvaKhare commentedon Aug 2, 2019
Shouldn't user just use
,(comma space) as separator?olekscode commentedon Jul 26, 2021
I think the result should be trimmed from both sides.
Because sometimes even data inside the same file is inconsistent.
In most cases, CSV files have data separated by commas, TSV files separate it by tabs.
But then some people add extra spaces:
And others don't:
It can be even more troublesome when there are tabs and the space can be invisible.
And then the users will be running into all kinds of problems.
For example, when
' 25'can not be parsed as a number because there is a space.So I think that it's better to trim whitespace characters from left and right when reading from a CSV.
(but only unless quotes are used! Because if a file contains something like
"Oleks", " 25 "then maybe clients want those spaces inside quotes)