PERF: performance improvement in MultiIndex.sortlevel by behzadnouri · Pull Request #9445 · pandas-dev/pandas (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i gave an example from python's documentation that this is an actual use-case for boolean operations:
This is sometimes useful, e.g., if
s
is a string that should be replaced by a default value if it is empty, the expressions or 'foo'
yields the desired value.
this is right off from python's documentation, and i have seen it used a lot.
that said, if you like to change it, please do.