📜  列之间的 pd 计算 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:03.001000             🧑  作者: Mango

代码示例1
# example multiplying column 'Price' by 'Sales':
df['Pofit'] = df['Price'] * df['Sales']
# this will create a new column in the Pandas DataFrame 'df' called 'Profit'
# dot notation can also be used, but only to the right of the assignment (by columns already in the DataFrame)