I have networkx v. 2.1. to make it work w/ pandas dataframe, i tried following:
networkx v. 2.1
pip3
In networkx 2.0 from_pandas_dataframe has been removed.
from_pandas_dataframe
Instead you can use from_pandas_edgelist.
Then you'll have:
g_data=G=nx.from_pandas_edgelist(x, 1, 2, edge_attr=True)