How do I edit my code so that there will only be a single number in the gradient function’s applied column?
So I have a dataframe with NaN values and I replaced them with 0 (you will see below).
I tried to calculated the np.gradient per row. I applied the output to a new column, but the column has multiple values in it.
Thereafter I wanted to list the index for where the gradient is negative.