my array look like this (9 columns)
[('2012-07', 'abc', 'EXECUTIVE', '149', '16 TO 18', 150., 1995,'apt', 1000000)
('2012-10', 'abc', 'EXECUTIVE', '194', '22 TO 24', 163., 1987, 'ma', 1010000)
('2014-12', 'abc', 'EXECUTIVE', '190', '19 TO 21', 150., 1987, 'ma', 1000000)]
print(a.shape)
output >> (3,)
print(len(a))
output >> 3
I want to delete the last 2nd column, so it will look like this
[('2012-07', 'abc', 'EXECUTIVE', '149', '16 TO 18', 150., 1995, 1000000)
('2012-10', 'abc', 'EXECUTIVE', '194', '22 TO 24', 163., 1987, 1010000)
('2014-12', 'abc', 'EXECUTIVE', '190', '19 TO 21', 150., 1987, 1000000)]
I tried the np.delete function:
b = np.delete(a,7,axis=1)
Error >> AxisError: axis 1 is out of bounds for array of dimension 1
My array has multiple rows with 9 columns, just want to delete one column.
Any help would be very much appreciated. Thanks!