📌  相关文章
📜  分配多列 pandas - Python 代码示例

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

代码示例2
import pandas as pd

df = {'col_1': [0, 1, 2, 3],
        'col_2': [4, 5, 6, 7]}
df = pd.DataFrame(df)

df[[ 'column_new_1', 'column_new_2','column_new_3']] = [np.nan, 'dogs',3]  #thought this wo