Skip to content

Problem parsing a particular table #182

Description

@LeSasse

(pystatis==0.4.0) I am not sure if i am not configuring this correctly, but with the following table:

https://www.regionalstatistik.de/genesis//online?operation=table&code=12411-01-01-4&bypass=true&levelindex=1&levelid=1744198492753#abreadcrumb

from pystatis.table import Table

pystatis_table = Table(name="12411-01-01-4")
pystatis_table.get_data()

i get the following error:

hit
Traceback (most recent call last):
  File "/home/leo/projects/geodata/src/test.py", line 4, in <module>
    pystatis_table.get_data()
  File "/home/leo/projects/geodata/.env/lib/python3.12/site-packages/pystatis/table.py", line 150, in get_data
    self.data = pd.read_csv(
                ^^^^^^^^^^^^
  File "/home/leo/projects/geodata/.env/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1026, in read_csv
    return _read(filepath_or_buffer, kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/leo/projects/geodata/.env/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 620, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/leo/projects/geodata/.env/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1620, in __init__
    self._engine = self._make_engine(f, self.engine)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/leo/projects/geodata/.env/lib/python3.12/site-packages/pandas/io/parsers/readers.py", line 1898, in _make_engine
    return mapping[engine](f, **self.options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/leo/projects/geodata/.env/lib/python3.12/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 161, in __init__
    self._validate_parse_dates_presence(self.names)  # type: ignore[has-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/leo/projects/geodata/.env/lib/python3.12/site-packages/pandas/io/parsers/base_parser.py", line 243, in _validate_parse_dates_presence
    raise ValueError(
ValueError: Missing column provided to 'parse_dates': 'Zeit'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions