I have a dataframe
id_command command_status stage line_amount global_amount
61 ZeFMAA1 Pending 582.96 582.96
61 UbUjNAAV Pending 70481.00 582.96
945 0bR8hEQAS Pending 6400.00 12800.00
I would like to add a new column "decision" which is a boolean value (true or false) True if global_amount of a command is greater than 30% of the sum of line_amount of a command, and false if is not .
Can you help me to do this ?
Thanks