[Python] polars implementation for creating objects selecting specific attributes

Discussão em 'Python' iniciado por Stack, Agosto 4, 2025.

  1. Stack

    Stack Membro Participativo

    The stanza annotation pipeline processes a text and it creates Sentences which in turn comprise of Words. These are objects created by Stanza. I want to select specific attributes of the Word objects that Stanza creates and create my own objects in a list of lists (the outer list is the whole text and the inner lists are the sentences). With a pandas DataFrame having each text annotation in a DataFrame cell, I would create a function with a double for loop to achieve that. I want to use the polars library. Can I do that using the polars API, or I do that like the pandas implementation?

    Continue reading...

Compartilhe esta Página