Skip to content

pandas>=2.0.0 unsupported #5

@svandermeer

Description

@svandermeer
AttributeError: 'float' object has no attribute 'rint'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "viktor_connector\connector.pyx", line 295, in connector.Job.execute
  File "viktor\core.pyx", line 1926, in viktor.core._handle_job
  File "viktor\core.pyx", line 1911, in viktor.core._handle_job._handle_view
  File "viktor\views.pyx", line 2031, in viktor.views.View._wrapper
  File "C:\Users\svandermeer\viktor-apps\table-view-application\app.py", line 32, in le_view
    return TableResult(df, dataframe_colours=df_colours, n_decimals={("Number", "Column 5"): 2})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\svandermeer\viktor-apps\table-view-application\venv\Lib\site-packages\viktor_table_view\table_view.py", line 47, in __init__
    super().__init__(html=self.get_html())
                          ^^^^^^^^^^^^^^^
  File "C:\Users\svandermeer\viktor-apps\table-view-application\venv\Lib\site-packages\viktor_table_view\table_view.py", line 69, in get_html
    self.format_dataframe()
  File "C:\Users\svandermeer\viktor-apps\table-view-application\venv\Lib\site-packages\viktor_table_view\table_view.py", line 61, in format_dataframe
    self.dataframe[column_key] = self.dataframe[column_key].round(n_decimals).astype(str)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\svandermeer\viktor-apps\table-view-application\venv\Lib\site-packages\pandas\core\series.py", line 2688, in round
    result = self._values.round(decimals)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: loop of ufunc does not support argument 0 of type float which has no callable rint method

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