I have an array in Python 3.9 with 3 columns, and I wanna print just the numbers of the third column that is smaller than 5. How I do that?
The array is called data.
array([[ 44410, 2003, 18],
[ 5712, 1991, 30],
[ 37123, 1990, 31],
[ 0, 2019, 2],
[ 25757, 2006, 15],
[ 10728, 2012, 9],
[ 0, 2019, 2],
[ 77599, 2009, 12],
[ 99197, 2010, 11]])
I tried this, but doesn't worked:
data[:, data[2] < 5]
Because appear just this message: array([ ], shape=(258, 0), dtype=int32)