updated to use networkx for string network rather than pandas dataframe