📜  尝试改用 .loc[row_indexer,col_indexer] = value - Python 代码示例

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

代码示例3
new_df = df.loc[df.col1>2].copy()
new_df.loc[2, 'new_column'] = 100