There are four columns, one with the name, the int, the mean, and the standard deviation.
Write a function to run each row (say there are 30 different rows) from one column to calculate what percentage the specific row is away from the mean (which is taken from another column and return what percentage it deviates from the mean). Basically, compare one row name apple with the other row named bear to check if they are similar.
Say there needs to be a function to check if the two tags are the same or not by checking it’s percentage it deviates from the mean in case the output is expected to be ‘bear’ and it accidentally happens to be ‘apple’.
For example, say the mean is 20 for bear and it’s known from that the item bear is 16 while apple is 10, figure out whatever percentage away from the mean that product is and return that number for each items of that dataset (basically return what percentage it deviates from the mean). Assume this is in a dataframe.
Say the df looks like
name: price: mean: standard deviation:
apple 10 13 7.96
apple 14 13 7.96
bear 16 20 5.23
bear 17 20 5.23