The red line is the "definition" of the .csv file, while the blue line is the actual data. So which one do you need? Both.
Count the position until "loadspec" in the definition in your red line example. Which position has it? 16
Now count the 16th position in the actual data. Which string is that? mp_shipment
16 is highly arbitrary, so you need to recount it for every map .csv file. And make sure that the actual data value for "loadspec" is always set to the name of the current map ($mapname.csv)
That's what the Python script will check for later:
PHP Code:
elif row[loadspec_index] != mapname:
print(mapname, "has invalid loadspec for", row[0])