Complete the code to add two columns 'A' and 'B' in the DataFrame and store the result in a new column 'C'.
df['C'] = df['A'] [1] df['B']
To add two columns in pandas, use the '+' operator between the columns.
Complete the code to subtract column 'B' from column 'A' and save it in column 'D'.
df['D'] = df['A'] [1] df['B']
The '-' operator subtracts values element-wise between two columns.
Fix the error in the code to multiply columns 'A' and 'B' correctly and store in 'E'.
df['E'] = df['A'] [1] df['B']
The '*' operator multiplies values element-wise between two columns.
Fill both blanks to divide column 'A' by column 'B' and store the result in column 'F'.
df['F'] = df[[1]] [2] df['B']
To divide column 'A' by column 'B', use df['A'] / df['B'].
Fill all three blanks to create a new column 'G' with the sum of columns 'A' and 'B' multiplied by column 'C'.
df['G'] = (df[[1]] [2] df[[3]]) * df['C']
The expression adds columns 'A' and 'B' first, then multiplies by column 'C'. Here, the blanks fill the addition part.