I want to delete nan
from a numpy array. Lets say my numpy array contains:
np_array = ["123","pqr","123",nan,"avb", nan]
Expected output:
["123","pqr","123","avb"]
If we do it in pandas using pandas.dropna()
it deletes the whole row which I don't want to do. I just want to delete the value and reduce the array size.
Is there any possible way to do so?