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

How to handle locale-specific behavior? #13

Open
tbrown122387 opened this issue Sep 20, 2020 · 0 comments
Open

How to handle locale-specific behavior? #13

tbrown122387 opened this issue Sep 20, 2020 · 0 comments

Comments

@tbrown122387
Copy link
Owner

tbrown122387 commented Sep 20, 2020

A student submission featured code that read in a data set. On his machine and on mine, it looked like

                      Series.Name    Series.Code   Country.Name Country.Code X2014..YR2014.
1 Income share held by second 20% SI.DST.02ND.20    Afghanistan          AFG             ..
2 Income share held by second 20% SI.DST.02ND.20        Albania          ALB             ..
3 Income share held by second 20% SI.DST.02ND.20        Algeria          DZA             ..
4 Income share held by second 20% SI.DST.02ND.20 American Samoa          ASM             ..
5 Income share held by second 20% SI.DST.02ND.20        Andorra          ADO             ..
6 Income share held by second 20% SI.DST.02ND.20         Angola          AGO             ..

However, when it runs on the server, it looks like this

                  X...Series.Name    Series.Code   Country.Name Country.Code
1 Income share held by second 20% SI.DST.02ND.20    Afghanistan          AFG
2 Income share held by second 20% SI.DST.02ND.20        Albania          ALB
3 Income share held by second 20% SI.DST.02ND.20        Algeria          DZA
4 Income share held by second 20% SI.DST.02ND.20 American Samoa          ASM
5 Income share held by second 20% SI.DST.02ND.20        Andorra          ADO
6 Income share held by second 20% SI.DST.02ND.20         Angola          AGO

All subsequent code that assumed column names therefore broke.

This stackoverflow post mentions that default column names are not always consistent across machines with different locales.

  • what are other examples of inconsistencies?
  • what is the best way to fix them so that the student doesn't have to worry about this sort of thing?
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

1 participant