I would probably do the following:
Load your point layer into QGIS and run the Split vector layer with
Network
as the Unique ID field. The results will be saved to a directory.Run the following code in the Python Console. It uses the same Distance matrix tool but only calculates the points for each
Network
and outputs the statistics including the maximum distance. Change the paths and field names accordingly:import glob, os, processing path = "C:/Users/You/Desktop/Folder/" output_path = "C:/Users/You/Desktop/Folder/Results/" field_1 = "Field_1" field_2 = "Field_2" for layer in glob.glob(path + "*.shp"): processing.runalg("qgis:distancematrix", layer, field_1, layer, field_2, 2, 0, output_path + os.path.splitext(os.path.basename(layer))[0] + ".csv")