0
I am learning some commands for analyzing data extracted from a CSV file and locked in the following situation:
I want to use as a basis this CSV to realize the average of the room:
Nome;P1;P2;P3
Maria;8;7;10
Julia;9.5;10;7
Ailton;7;8;10
Leo;4;5;3
So far I have it, which I know to be the beginning:
import csv
with open('notas.csv', 'rb') as csvfile:
csv = csv.reader(csvfile, delimiter=';', quotechar='|')
lista = []
for row in csv:
lista.append(row)
How do I result in the average of the room per test and after that the overall with all the evidence?
I just need it to be printed at the end:
Média P1: X, média P2: Y, média P3: Z. Média final: A
With X being the average of all P1, Y the average of all P2, Z the average of all P3 and A the average of all banknotes.
If more evidence or people are added, the account must continue to be made with the same code.
Edit the question and detail the problem and the code to understand what the input and output data, so we can help you, we are not a forum for debates, there is no way to kick answer, give the minimum parameters. Thank you!
– Guilherme Nascimento
Edited publication.
– Cultivada
Thanks Julia, and what is the expected "output" based on example CSV in your question?
– Guilherme Nascimento
Redacted.
– Cultivada
Okay, put the results up as they should be, please.
– Guilherme Nascimento