Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: df.select uses bool(crit(x)) rather then crit(x) #2532

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ pandas 0.10.0
- Optimize ``unstack`` memory usage by compressing indices (GH2278_)
- Fix HTML repr in IPython qtconsole if opening window is small (GH2275_)
- Escape more special characters in console output (GH2492_)
- df.select now invokes bool on the result of crit(x) (GH2487_)

**Bug fixes**

Expand Down Expand Up @@ -297,6 +298,7 @@ pandas 0.10.0
.. _GH2447: https://github.com/pydata/pandas/issues/2447
.. _GH2275: https://github.com/pydata/pandas/issues/2275
.. _GH2492: https://github.com/pydata/pandas/issues/2492
.. _GH2487: https://github.com/pydata/pandas/issues/2487
.. _GH2273: https://github.com/pydata/pandas/issues/2273
.. _GH2266: https://github.com/pydata/pandas/issues/2266
.. _GH2038: https://github.com/pydata/pandas/issues/2038
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def select(self, crit, axis=0):
axis = self._get_axis(axis)

if len(axis) > 0:
new_axis = axis[np.asarray([crit(label) for label in axis])]
new_axis = axis[np.asarray([bool(crit(label)) for label in axis])]
else:
new_axis = axis

Expand Down