counts = df['count'].astype(float)
lengths = df['gene_length'].astype(float)
df['rpkm'] = calculate_RPKM(counts, N, lengths)
How to apply functions with multiple arguments on Pandas selected columns data frame