I have pandas dataframe which consist of 10 columns.
- each row consist a step performed by a user to online. there are total of 10 columns so all 10 step process
- lets say first activity is booking a flight ticket so steps are login website-->give src dest time-->select seats-->pay--review
so there are various permutations can happen at every step, I want to draw a directed graph out of all dataset.
currently networkx supports only 2 columns in
# libraries
import pandas as pd
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
# Build your graph
G=nx.from_pandas_dataframe(df, 'src', 'dest',create_using=nx.DiGraph())
# Plot it
nx.draw(G, with_labels=True)
plt.show()
can someone tell me how to d it for more than two column directed graph