datapasta
datapasta copied to clipboard
Function assuming that , is a decimal character
I work a lot with European-local CSVs (using ,
as a decimal separator and ;
as the delimiter) and TSVs (again using ,
as a decimal separator). Would it be possible to add a version of the datapasta functions (or an argument) that assumes that ,
is not a separator?
I think so? https://milesmcbain.github.io/datapasta/articles/how-to-datapasta.html#dealing-with-decimal-marks
Does that do what you want?
I apologise for not using an option. I wrote that a LONG time ago.
Oh, I did not see that before. That would work okay, but would be fiddly in a session to have to set the global variable back and forth. (I am often in the situation of pulling in spreadsheet data from many locales in one sitting.)
If there where a function that would do the parsing with a different or user-specified decimal separator rather than the global environment separator, that would be most convenient. That would let me set two different keyboard shortcuts.
Such a function could be a simple wrapper around the existing functions to (1) change the global variable, (2) call the existing function, and (3) restore the original global variable