I have an array of arrays called x and I am trying to do ravel on it but the result is the same x. It is not flattening anything. I have also tried the function flatten(). Can someone explain me why is this happening?
x = np.array([np.array(['0 <= ... < 200 DM', '< 0 DM', 'no checking account'], dtype=object),
np.array(['critical account/ other credits existing (not at this bank)',
'existing credits paid back duly till now'], dtype=object),
np.array(['(vacation - does not exist?)', 'domestic appliances'],
dtype=object)], dtype=object)
np.ravel(x)
I am actually trying to reproduce the code in this question: One-hot-encoding multiple columns in sklearn and naming columns but I am blocked by the ravel().
Thanks