This is my current dataframe. I would like to add two new columns called PriceError and CostError.
Price 1 Price2 Cost1 Cost2 %Price %Cost PriceError CostError
1 1 3 6 0 100
2 4 3 3 100 0
df['PriceError'] should equal the following string Price1 is 2 and Price1 is 4. The %Price is 100
.
df['CostError'] should equal the following string Cost1 is 3 and Cost1 is 6. The %Price is 100
.
I am only returning those because the other two are below 50% which is my threshold for errors.
SO PriceError is hardcoded to "Price1 is df['Price1']
and Price2 is df['Price2']
and the %Price is df['%Price']
".
I would like to some sort of way to write that PriceError should only look at columns price1, price2, and %price and write the string.