CorrelAid / pystatis

MIT License
6 stars 1 forks source link

[BUG] get_data method throws KeyError when using language='en' #88

Closed bergnerjonas closed 1 month ago

bergnerjonas commented 1 month ago

Reproducible Example

from pystatis import Table
table = Table(name='81000-0001') 
table.get_dagetta(language='en') 

Error description

When passing language='en'to the get_data method, the following KeyError is thrown:

KeyError: 'Zeit_Label'

Possible solution

The parsing methods need to be adjusted to handle english column names, like in here:

https://github.com/CorrelAid/pystatis/blob/eea4acbb9374b9b658edf6884cd5aee0b77c86fe/src/pystatis/table.py#L127-L134

bergnerjonas commented 1 month ago

I will take a look at fixing this myself

pmayd commented 1 month ago

This should already have been done by Pia, she introduced a dictionary for the language and changed the labels, didn't she? I know there was aPR where we discussed the different labels in different languages

bergnerjonas commented 1 month ago

You mean https://github.com/CorrelAid/pystatis/pull/58, right? I will close the issue then.