5

Is it possible to format a column name in Pandas to have subscripts superscripts? I tried using dollars as $x_a^2$:

import pandas as pd
pd.DataFrame(list([1,2,3]),columns=['$x_a^2$'])

but in jupyter notebook I get a strange | character in the end enter image description here

aless80
  • 3,122
  • 3
  • 34
  • 53

0 Answers0