Skip to content

Not supported in Pandas >= 3.0.0 #364

Description

@plumonito

An exception is thrown when writing a ply file. The issue comes from trying to index the pandas dataframe dtypes by index: df.dtypes[i]. It only supports indexing by name now.

Exception:

.venv/lib/python3.12/site-packages/pyntcloud/core_class.py:182: in to_file
    TO_FILE[ext](**kwargs)
.venv/lib/python3.12/site-packages/pyntcloud/io/ply.py:209: in write_ply
    header.extend(describe_element('vertex', points))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.12/site-packages/pyntcloud/io/ply.py:260: in describe_element
    f = property_formats[str(df.dtypes[i])[0]]
                             ^^^^^^^^^^^^
.venv/lib/python3.12/site-packages/pandas/core/series.py:959: in __getitem__
    return self._get_value(key)
           ^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.12/site-packages/pandas/core/series.py:1046: in _get_value
    loc = self.index.get_loc(label)
          ^^^^^^^^^^^^^^^^^^^^^^^^^

Versions:

  • pyntcloud: 0.3.1
  • pandas: 3.0.0

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions