布尔系列上的Pandas Series.replace

时间:2014-02-12 16:31:57

标签: python pandas boolean

输入

Series([True, False, True]).replace('fdsa','lkjh')

输出

0     lkjh
1    False
2     lkjh
dtype: object

我希望:

0     True
1    False
2     True
dtype: bool

这使得使用布尔数据非常烦人。当前行为背后的原因是什么?

0 个答案:

没有答案
相关问题