Hi, I am new to Python. I need to make an arithmetic calculation of excel data using Python, but the data arrangement is a bit complicated.
I have to calculate
(D5*D4 + C5*C4)*B5
which the results are placed on column H
then it continues to the entire materials (adipose tissue newborn #1 to adipose tissue adult #1)
(D6*D4 + C6*C4)*B6
(D7*D4 + C7*C4)*B7
(D8*D4 + C8*C4)*B8
etc.
Could anyone please help me? Below is my current codes, and I am getting stuck how to code the operation. Thank you very much in advance
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
%matplotlib inline
# read an excel file and convert
# into a dataframe object
df = pd.DataFrame(pd.read_excel("ICRU_blank_af.xlsx"))
# show the dataframe
df.head(5)
=(D5*D$4 + C5*C$4)*B5in cellH5and copy down.