If you have a large csv I'd recommend using pandas for the I/O portion of your task. networkx has a useful method to interface with pandas called from_pandas_dataframe. Assuming your data is in a csv in the format you stated above, this command should work for you:
df = pd.read_csv('path/to/file.csv', columns=['node1', 'node2', 'weight'])
But for demonstration I'll use 10 random edges within your requirements (you won't need to import numpy, I'm just using it for random number generation):
import matplotlib as plt import networkx as nx import pandas as pd #Generate Random edges and weights import numpy as np np.random.seed(0) # for reproducibility w = np.random.rand(10) # weights 0-1 node1 = np.random.randint(10,19, (10)) # I used 10-19 for demo node2 = np.random.randint(10,19, (10)) df = pd.DataFrame({'node1': node1, 'node2': node2, 'weight': w}, index=range(10))
Everything in the previous block should generate the same as your pd.read_csv command. Resulting in this DataFrame, df:
node1 node2 weight 0 16 13 0.548814 1 17 15 0.715189 2 17 10 0.602763 3 18 12 0.544883 4 11 13 0.423655 5 15 18 0.645894 6 18 11 0.437587 7 14 13 0.891773 8 13 13 0.963663 9 10 13 0.383442
Use from_pandas_dataframe to initialize MultiGraph. This assumes you will have multiple edges connecting to one node (not specified in OP). To use this method, you will have to make an easy change in networkx source code in the convert_matrix.py file, implemented here (it was a simple bug).
MG = nx.from_pandas_dataframe(df, 'node1', 'node2', edge_attr='weight', create_using=nx.MultiGraph() )
This generates your MultiGraph, you can visualize it utilizing draw:
positions = nx.spring_layout(MG) # saves the positions of the nodes on the visualization # pass positions and set hold=True nx.draw(MG, pos=positions, hold=True, with_labels=True, node_size=1000, font_size=16)
In detail: positions is a dictionary where each node is a key and the value is a position on the graph. I'll describe why we store positions below. The generic draw will draw your MultiGraph instance MG with the nodes at the specified positions. However, as you can see the edges are all the same width:

But you have everything you need to add the weights. First get the weights into a list called weights. Iterating (with list comprehension) through each edge with edges, we can extract the weights. I chose to multiply by 5 because it looked the cleanest:
weights = [w[2]['weight']*5 for w in MG.edges(data=True)]
Finally we'll use draw_networkx_edges, which only draws the edges of the graph (no nodes). Since we have the positions of the nodes, and we set hold=True, we can draw weighted edges right on top of our previous visualization.
nx.draw_networkx_edges(MG, pos=positions, width=weights) #width can be array of floats

You can see node (14, 13) has the heaviest line and the largest value from the DataFrame df (besides the (13,13)).