I have the following dataset:
0 1 2 3
0 a ❤
1 b ❤
2 c
3 d ✨
4 e ❤
I would like to perform clustering to group the ROWS which have something in common.
By using networkx in the following code, this is the result:
import networkx as nx
import matplotlib.pyplot as plt
G=nx.from_pandas_edgelist(df, 0, 1)
nx.draw(G, with_labels=True)
plt.show()
output: groups obtained with networkx
How can I also consider columns 2 and 3? Can I also do it without giving any priority to any particular column (example, I want column 2 to be equally important as column 1)?