Skip to content

Revisit dataframe export column types #8583

Closed

Description

@jpfeuffer

coltypes = ['U100', 'f', 'f', 'f', 'i','U1000', 'U1000', 'U1000', 'i', 'i'] + types

U1000 is super wasteful. Either calculate the longest string for each col in a primary pass or use a python string object type, which is kind of like a pointer and not great for cache locality. But memory efficient and safe.
Investigate if the python string type would still let us preallocate arrays (I think it should).

Activity

  1. added
    beginner tasks
    on Jan 2, 2026
  2. jpfeuffer commented on Jan 2, 2026

    @jpfeuffer
    ContributorAuthor

    Check if there are other dataframe exports that have this problem.

  3. jpfeuffer commented on Jan 2, 2026

    @jpfeuffer
    ContributorAuthor

    Also try the S type instead of U for Unicode since we internally use ASCII only. Maybe you can skip the de/encoding of an OpenMS String or std::string.

  4. khushiiagrawal commented on Jan 4, 2026

    @khushiiagrawal

    hii @jpfeuffer , I’d like to take this issue if it’s still open. I’ll look into improving the dataframe export column dtypes (replacing U1000, testing S / string types) and check for similar cases elsewhere.

    Thanks!

  5. jpfeuffer commented on Jan 4, 2026

    @jpfeuffer
    ContributorAuthor

    Sure!

  6. added a commit that references this issue on Jan 6, 2026
    2cc8cc8
  7. PrakharLal commented on Mar 13, 2026

    @PrakharLal

    Hi, I am a GSoC 2026 aspirant and would like to work on this issue.
    Could you please guide me if this issue is still available and if there are any specific implementation expectations?

  8. jpfeuffer commented on Mar 13, 2026

    @jpfeuffer
    ContributorAuthor

    Yes sure. You have to investigate first in the new nanobind bindings, if this is still a problem, and if so, check the last PR what was discussed since the last PR was 99% done.

    @timosachsenberg any comments?

  9. timosachsenberg commented on Mar 13, 2026

    @timosachsenberg
    Contributor

    It might be resolved w so please double check

  10. PrakharLal commented on Mar 14, 2026

    @PrakharLal

    Thanks for the pointers!
    @timosachsenberg , @jpfeuffer
    I reviewed PR #8606 and tested the current DataFrame export behavior using the latest develop branch. From my checks, the exported columns now appear to use Python object dtype instead of the previous fixed-width Unicode types (U100/U1000).

    So it seems the issue may already be resolved with the nanobind-based implementation. I’ll continue checking a few additional cases to make sure there are no remaining edge cases

  11. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

    Hacktoberfestbeginner taskswontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions