Fairly new to python
Let’s say I have this 2d array:
my_array = [[1,2,3,4], [1,2,NaN,4], [1,2,3,4]]
I want it so if a NaN is detected (or any certain value for that matter) that the entire array it is located in is deleted.
my_new_array = [[1,2,3,4], [1,2,3,4]]
A lot of what I search for looks at just dropping that value and I am unsure how to do this given with how my array is structured.
New contributor
Acorny is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1