File tree 1 file changed +28
-0
lines changed 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -4630,6 +4630,34 @@ def isin(self, values) -> "Series":
4630
4630
4 True
4631
4631
5 False
4632
4632
Name: animal, dtype: bool
4633
+
4634
+ New behaviour from pandas v1.2.0 caused some tests to fail because users where unaware of this change.
4635
+
4636
+ Before v1.2.0:
4637
+
4638
+ >>>import pandas as pd
4639
+ pd.Series([0]).isin(['0'])
4640
+ # 0 True
4641
+ # dtype: bool
4642
+ pd.Series([1]).isin(['1'])
4643
+ # 0 True
4644
+ # dtype: bool
4645
+ pd.Series([1.1]).isin(['1.1'])
4646
+ # 0 True
4647
+ # dtype: bool
4648
+
4649
+ From v1.2.0
4650
+
4651
+ >>>import pandas as pd
4652
+ pd.Series([0]).isin(['0'])
4653
+ # 0 False
4654
+ # dtype: bool
4655
+ pd.Series([1]).isin(['1'])
4656
+ # 0 False
4657
+ # dtype: bool
4658
+ pd.Series([1.1]).isin(['1.1'])
4659
+ # 0 False
4660
+ # dtype: bool
4633
4661
"""
4634
4662
result = algorithms .isin (self ._values , values )
4635
4663
return self ._constructor (result , index = self .index ).__finalize__ (
You can’t perform that action at this time.
0 commit comments