Skip to content
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

Function assuming that , is a decimal character #119

Open
bwiernik opened this issue Jan 26, 2021 · 2 comments
Open

Function assuming that , is a decimal character #119

bwiernik opened this issue Jan 26, 2021 · 2 comments

Comments

@bwiernik
Copy link

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?

@MilesMcBain
Copy link
Owner

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.

@bwiernik
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants