I am trying to create a DataFrame
from a simple if statement result with no success. Could you show me the right method, please? This is what I have so far but the value of discrep
is not added to the DataFrame
.
discrepancy_value=round(system_availability.iloc[0,0]-data_av.iloc[0,0],2)
discrep=[]
if discrepancy_value>1:
discrep=discrepancy_value
else:
discrep=r'Discrepancy is not significant'
discrepancy=pd.DataFrame()
discrepancy['Discrepancy']=discrep