Skip to content

Pyarrow: convert from DataType(string_view) to DataType(string) #44540

Closed as not planned

Description

@kevinli1993

Describe the usage question you have. Please include as many useful details as possible.

Hi, is there a way to cast a string_view array into a string array in Pyarrow?

I find that the string type is better supported, e.g. pc.count_distinct() works on a string array, but not a string_view array. It is also easier to interface with other libraries, since the string type is better supported in older versions.

Component(s)

Python

Activity

  1. added
    Type: usage
    on Oct 26, 2024
  2. AlenkaF commented on Oct 28, 2024

    @AlenkaF
    Member

    Hi @kevinli1993, thank you for opening an issue!
    There is an open issue that tracks progress of adding basic functionality to the new string view type (first in C++): #39634.

    I suggest we follow the status of the linked issue and close this one.

  3. kevinli1993 commented on Oct 28, 2024

    @kevinli1993
    Author

    That's perfect, thank you @AlenkaF for the pointer!

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

    Component: PythonType: usage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions