Spaces:
Sleeping
Sleeping
Update app.py
Browse files122 unmodified lines12312412512612712812913013113219 unmodified lines152153154155156157158159160161162163164165166167168122 unmodified linesif not pd.isnull(row[21]):#df_copy.at[index, 5] = row[21]df_copy.iloc[index, 5] = row[21]#print(row[21])else:#df_copy.at[index, 5] = row[20]df_copy.iloc[index, 5] = row[20]print(row[21])print("COLUMN5")print(df_copy.iloc[:,5])19 unmodified lines#Before it was df_copy.iloc[:,4]=(((df_copy.iloc[:,20]/1.2)/1.96)*0.96)#Equally to Column 5, i ncolumn 4 we have to check if there is value in 20 or notfor index, row in local_df.iterrows():if not pd.isnull(row[21]):#df_copy.at[index, 5] = row[21]#df_copy.iloc[index, 5] = row[21]df_copy.iloc[:,4]=(((df_copy.iloc[:,21]/1.2)/1.6)*0.96)#print(row[21])else:#df_copy.at[index, 5] = row[20]#df_copy.iloc[index, 5] = row[20]df_copy.iloc[:,4]=(((df_copy.iloc[:,20]/1.2)/1.6)*0.96)#print(row[21])#df_copy.iloc[:,4]=(((df_copy.iloc[:,20]/1.2)/1.6)*0.96)#WE CONVERT COLUMN 20 to numeric (in case it's read as string)df_copy.iloc[:,20] = df_copy.iloc[:,20].astype(float)122 unmodified lines12312412512612712812913013113213313419 unmodified lines154155156157158159160122 unmodified linesif not pd.isnull(row[21]):#df_copy.at[index, 5] = row[21]df_copy.iloc[index, 5] = row[21]df_copy.iloc[index,4]=(((row[21]/1.2)/1.6)*0.96)#print(row[21])else:#df_copy.at[index, 5] = row[20]df_copy.iloc[index, 5] = row[20]df_copy.iloc[index,4]=(((row[20]/1.2)/1.6)*0.96)print(row[21])print("COLUMN5")print(df_copy.iloc[:,5])19 unmodified lines#Before it was df_copy.iloc[:,4]=(((df_copy.iloc[:,20]/1.2)/1.96)*0.96)#Equally to Column 5, i ncolumn 4 we have to check if there is value in 20 or not#df_copy.iloc[:,4]=(((df_copy.iloc[:,20]/1.2)/1.6)*0.96)#WE CONVERT COLUMN 20 to numeric (in case it's read as string)df_copy.iloc[:,20] = df_copy.iloc[:,20].astype(float)
app.py+3-11