How can I draw an arrow in a dataframe in pandas?

Viewed 712

I want to draw an arrow in a cell on an excel sheet. My data is in the data frame and I would like to insert an arrow at a given cell (row, column) and then finally insert that in the excel or CSV sheet.

I thought of including UTF-8 value but couldn't get the output in normal Python shell. For instance, I found out that the utf-8 value for left arrow is U+2190 and I performed the following but could not get the arrow printed:

>>> a = 'U+2190'.encode('utf-8')
>>> a
b'U+2190'

Since I am unable to deduce how to get the corresponding character from the utf-8, I am unable to decide how to get it in the dataframe and get it printed.

2 Answers

After referencing from here, I was able to insert an arrow in the dataframe just like any other value:

df.at[prev_class_row_counter+1, 'Dependents'] = "➜"
Related