Create and drop columns in Pandas


I have a big data frame with minute wise data as below, where i do some functions and then drop columns.

datetime E10 E11 E12 E132 E21 E31 E32 E37 E40 E43 E44 E45 E47 E65 E8 E28 E41 E46 E48 E50 E51 E52 E53 E54
24-11-2021 07:30 22 122 62 232 55 874.2 32.8 351.2 1.4 0.3 5.1 4 1 24.2 76 0 0 0 0 0 0 0 0 0
24-11-2021 07:31 23 120 60 232 55 0 33.3 0 1.3 0.3 0 2 1 24.7 80 0 0 0 0 0 0 0 0 0
24-11-2021 07:32 22 123 61 208 54 0 32.9 0 1 0.3 0 3 1 24.7 79 0 0 0 0 0 0 0 0 0
24-11-2021 07:33 21 120 54 296 55 0 33 0 0.9 0.3 0 2 1 24.9 79 0 0 0 0 0 0 0 0 0
24-11-2021 07:34 21 122 58 272 50 0 32.4 0 0.9 0.3 0 3 1 24.3 77 0 0 0 0 0 0 0 0 0
---------------Answer---------------

If want use and then remove column from original use DataFrame.pop, then drop is not necessary:

df['E08'] = df.pop('E8') + df.pop('E132').multiply(0.1467)
df['E037'] = df.pop('E37') - df.pop('E65')
...

Previous : How to access the correct `this` inside a callback
Next : What is a NullReferenceException, and how do I fix it?