rich_tools icon indicating copy to clipboard operation
rich_tools copied to clipboard

Index values seem ignored

Open valankar opened this issue 2 years ago • 0 comments

It seems the values I have in an index column are ignored:

print(etfs_df)

      shares
SCHA   396.08
SCHB   366.17
SCHE   357.92
SCHF  1008.04
SCHO   541.17
SCHX  1091.63
SCHZ   377.93
rich.print(df_to_table(etfs_df, index_name='ETF'))

┏━━━━━┳━━━━━━━━━┓
┃ ETF ┃ shares  ┃
┡━━━━━╇━━━━━━━━━┩
│ 0   │ 396.08  │
│ 1   │ 366.17  │
│ 2   │ 357.92  │
│ 3   │ 1008.04 │
│ 4   │ 541.17  │
│ 5   │ 1091.63 │
│ 6   │ 377.93  │
└─────┴─────────┘

Is there a way to fix this?

valankar avatar Mar 15 '23 12:03 valankar