def calculate_RPKM(theC, theN, theL):
    """
    theC  == Total reads mapped to a feature (gene/linc)
    theL  == Length of feature (gene/linc)
    theN  == Total reads mapped
    """
rpkm = 10 ** 9 * theC / (theN * theL)
return rpkm
df['rpkm'] = calculate_RPKM(df['count'], N, df['gene_length'])
How to apply functions with multiple arguments on Pandas selected columns data frame