write code to creqte a Dataframe and subtract mean of a row from each elements of the row in a Dataframe
Answers
Answered by
0
Answer:
I have a dataframe with rows indexed by chemical element type and columns representing different samples. The values are floats representing the degree of presence of the row element in each sample.
I want to compute the mean of each row and subtract it from each value in that specific row to normalize the data, and make a new dataframe of that dataset.
I tried using mean(1), which give me a Series object with the mean for each chemical element, which is good, but then I tried using subtract, which didn't work.
Similar questions
World Languages,
1 month ago
Science,
1 month ago
Computer Science,
1 month ago
Math,
3 months ago
Chemistry,
9 months ago