2881. Create a New Column

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 2881

import pandas as pd


def createBonusColumn(employees: pd.DataFrame) -> pd.DataFrame:
    employees['bonus'] = employees['salary'] * 2
    return employees