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

Feat/53 handle different languages #58

Open
wants to merge 17 commits into
base: dev
Choose a base branch
from

Conversation

PiaSchroeder
Copy link
Collaborator

@PiaSchroeder PiaSchroeder commented Feb 25, 2024

Closes #53

  • used decimal points or commas in pd.read_csv() depending on the chosen language so that floats are read as floats instead of strings
  • introduced a database and language specific dictionary for column names so that prettify_table works for en and de

src/pystatis/config.py Outdated Show resolved Hide resolved
src/pystatis/table.py Outdated Show resolved Hide resolved
src/pystatis/table.py Outdated Show resolved Hide resolved
src/pystatis/table.py Outdated Show resolved Hide resolved
src/pystatis/table.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@pmayd pmayd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments for small improvements but overall, looks good!

src/pystatis/config.py Outdated Show resolved Hide resolved
src/pystatis/config.py Outdated Show resolved Hide resolved
@bergnerjonas
Copy link
Collaborator

Will add tests for language support once #99 is merged.

@bergnerjonas
Copy link
Collaborator

Will not support language='en' for Regionalstatistik database, since the API responses are of low data quality and handling them is too complicated and error prone.


pretty_data = pd.concat([time, attributes, values], axis=1)
pretty_data = pd.concat([time, attributes, values], axis=1).dropna(axis=0, how="all")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether we actually want dropna, as NaN's contain a lot of "irregular" but relevant information (see other open issues). At first glance, nothing else to complain about :)

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

Successfully merging this pull request may close these issues.

Handle different languages
4 participants