fixing an issue while converting pandas dataframe into rst format