Skip to content

add __repr__ to schema class so a print() call is not needed to represent the schema  #299

@Gerhardsa0

Description

@Gerhardsa0

Is your feature request related to a problem? Please describe

At the moment we need to call the print()-function if we want a short representation of the schema. Also each column creates a own line, which makes the output very long.

Desired solution

It should be possible to just call table.schema, which should create an output like this.

TableSchema: 
Column Count: 2
Columns: [(coulmn_name1, type1), (column_name2, type2)]

At the moment the Code looks like this: print(table.schema.__str__()) and creates the following output. -->

TableSchema: 
Column Count: 2
Columns: coulmn_name1, type1
         column_name2, type2

This will make the Useability with Notebooks better.

Possible alternatives (optional)

Screenshots (optional)

Additional context (optional)

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