Relative Content

Tag Archive for python-3.xout-of-memorynetworkx

This Python 3 code takes too much memory(using NetworkX package)

data = pd.read_csv(‘/content/drive/MyDrive/processed_data.csv’) G=nx.from_pandas_edgelist(data, ‘Primary_id’, ‘id’, edge_attr = [‘Location’,’month’, ‘day’,’year’], create_using=nx.DiGraph()) G.number_of_edges() keys = [] for i in range(0,G.number_of_edges()): if(list(nx.get_edge_attributes(G,’Location’).values())[i] != ‘xxxx’): keys.append(nx.get_edge_attributes(G,’Location’).keys()) This code doesn’t work on my computer due to an out-of-memory problem. python-3.x out-of-memory networkx New contributor 조준우 is a new contributor to this site. Take care in asking for clarification, commenting, […]

This python3 code takes too much memory(using networkx package)

data = pd.read_csv(‘/content/drive/MyDrive/processed_data.csv’) G=nx.from_pandas_edgelist(data, ‘Primary_id’, ‘id’, edge_attr = [‘Location’,’month’, ‘day’,’year’], create_using=nx.DiGraph()) G.number_of_edges() keys = [] for i in range(0,G.number_of_edges()): if(list(nx.get_edge_attributes(G,’Location’).values())[i] != ‘xxxx’): keys.append(nx.get_edge_attributes(G,’Location’).keys()) This code doesn’t work in my computer due to out of memory problem python-3.x out-of-memory networkx New contributor 조준우 is a new contributor to this site. Take care in asking for clarification, […]