Python Forum
Why any(0) does not work here?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why any(0) does not work here?
#2
By default [] (__getitem__) operation applied by rows (when the argument is boolean array). You can use loc,e.g.

data.loc[:, (np.abs(data) > 2).any(0)]
Reply


Messages In This Thread
Why any(0) does not work here? - by new_to_python - Feb-09-2020, 02:56 PM
RE: Why any(0) does not work here? - by scidam - Feb-10-2020, 12:15 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020