一、每日一题
解答:
import pandas as pd
def modifySalaryColumn(employees: pd.DataFrame) -> pd.DataFrame:
employees.loc[:,'salary'] = employees.loc[:,'salary'] * 2
return employees
题源:力扣
二、总结
考察.loc的使用方法,查看我之前的博客.loc总结。
解答:
import pandas as pd
def modifySalaryColumn(employees: pd.DataFrame) -> pd.DataFrame:
employees.loc[:,'salary'] = employees.loc[:,'salary'] * 2
return employees
题源:力扣
考察.loc的使用方法,查看我之前的博客.loc总结。