[Python] pyarrow Table adds column '__index_level_0__'

Discussão em 'Python' iniciado por Stack, Setembro 5, 2025.

  1. Stack

    Stack Membro Participativo

    If I create a pandas df and convert that to a pyarrow Table, I got an additional column 'index_level_0'.

    How do I get rid of it?

    from pyarrow import Table
    import pandas as pd

    df_empty = pd.DataFrame(columns=["a", "b", "c",])
    df_empty = df_empty.astype(
    {"a": "int64", "b": "datetime64[ns]", "c": "int64"}
    )
    df = Table.from_pandas(df_empty)


    [​IMG]

    Continue reading...

Compartilhe esta Página