def to_pandas_dataframe(G, nodelist=None, dtype=None, order=None, multigraph_weight=sum, weight='weight', nonedge=0.0):
 import pandas as pd
 M = to_numpy_matrix(G, nodelist=nodelist, dtype=dtype, order=order, multigraph_weight=multigraph_weight, weight=weight, nonedge=nonedge)
 if (nodelist is None):
  nodelist = list(G)
 return pd.DataFrame(data=M, index=nodelist, columns=nodelist)

def to_pandas_dataframe ( G , nodelist = None , dtype = None , order = None , multigraph_weight = sum , weight = 'weight' , nonedge = 0.0 ) : import pandas as pd M = to_numpy_matrix ( G , nodelist = nodelist , dtype = dtype , order = order , multigraph_weight = multigraph_weight , weight = weight , nonedge = nonedge ) if ( nodelist is None ) : nodelist = list ( G ) return pd . DataFrame ( data = M , index = nodelist , columns = nodelist )
return the graph adjacency matrix as a pandas dataframe .