# python pandas 满足一定条件设置另一个值 **Published by:** [KeepLearning](https://paragraph.com/@keeplearning-2/) **Published on:** 2022-11-28 **URL:** https://paragraph.com/@keeplearning-2/python-pandas-2 ## Content df.loc[(df.candle_begin_time == timetime) & (df.symbol == 'ETHUSDT'), '因子'] = 2 ## Publication Information - [KeepLearning](https://paragraph.com/@keeplearning-2/): Publication homepage - [All Posts](https://paragraph.com/@keeplearning-2/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@keeplearning-2): Subscribe to updates