1
I need to select the last value of the column "Season Minimum" to calculate the value of "Mint", name I gave the variable of the same column, currently my line of codes is like this:
import numpy as np
import pandas as pd
#DATABASE
data = {'Jogos':[1, 2, 3, 4],
'Placar':[12, 24, 10, 24],
'Mínimo da Temporada':[12, 12, 10, 10],
'Máximo da Temporada':[12, 24, 24, 24],
'Quebra recorde mín':[0, 0, 1, 1],
'Quebra recorde max':[0, 1, 1, 1]}
df = pd.DataFrame(data)
j = input("Número de Jogos:")
p = input("Qual foi o placar?:")
mint = 0
if int(p) < :
mint = p
new_row = {'Jogos':j, 'Placar': p, 'Mínimo da Temporada': mint, 'Máximo da Temporada': maxt, 'Quebra recorde mín': qrmin, 'Quebra recorde max': qrmax,}
df = df.append(new_row, ignore_index=True)
print(df)
Sorry for the possible incorrect language, I’m still learning to program.
Welcome, Gabriel. First of all. remove the image from the post and paste the code so that we can copy, test, edit, etc.; After you paste the code into the question, select it and use the Ctrl+K shortcut to format it properly.
– Evilmaax
Thanks for the help, I still don’t know how to use this site right.
– Gabriel Junges