Can you show a real CSV file (several lines) and answer directly the question what does "maximum value" mean (maximum per line, column or file)? In my opinion, the description of your problem and your answers are a bit chaotic.