How can I multiply two columns of within a same dataframe? My dataframe looks like below image and I want to output like this. However, I cannot find how to multiply two columns that are dependent on first row of same dataframe. I would really appreciate some help on this.
request totalbytes
/login 8520
/shuttle/countdown/ 7970
/shuttle/countdown/liftoff.html 0
Now that you explained what you want... You actually want to drop duplicates:
(df['bytesbytes']*df['bytesfrequency']).drop_duplicates()