It causes a SyntaxWarning on install, and possibly undefined test results
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/956021
Forwarded: https://github.com/pandas-dev/pandas/pull/33322
Gbp-Pq: Name fix_is_warnings.patch
# need to adapt first drop for case that both keys are 'A' --
# cannot drop the same column twice;
- # use "is" because == would give ambiguous Boolean error for containers
+ # plain == would give ambiguous Boolean error for containers
first_drop = (
- False if (keys[0] is "A" and keys[1] is "A") else drop # noqa: F632
+ False
+ if (
+ type(keys[0]) == str
+ and keys[0] == "A"
+ and type(keys[1]) == str
+ and keys[1] == "A"
+ )
+ else drop
)
# to test against already-tested behaviour, we add sequentially,
# hence second append always True; must wrap keys in list, otherwise