I'm working with arabic_reshaper to display my data from the CSV file (i saved the file using the save as type: CSV UTF-8(Comma delimited))
To From
أَبُو كَامِلٍ الْجَحْدَرِيُّ عَبْدُ الْوَاحِدِ
عَبْدُ الْوَاحِدِ الْأَعْمَشُ
I would like display the graph using networkx as follow:
My codes are as follow
import arabic_reshaper
data = pd.read_csv('textArab6.csv')
df2 = pd.DataFrame(data)
G = nx.from_pandas_edgelist(df2,arabic_reshaper.reshape('From'),arabic_reshaper.reshape('To'))
nx.draw(G,
with_labels=True,
node_color="skyblue",
node_size=5000,
)
Definitey before i post my question here, i already referred from this url: Right-to-left Support in Python Networkx and matplotlib However the codes sample showed that the letter was not extracted from a csv file. My problem is that, how to display the arabic letters properly in graph in which the data taken from a csv file.