Intention behind dropping the negative values

Question 1 - Hi @Ishvinder , the below attached image is from the Week 11’s Visualization part. After marking the negative values as red, i didn’t understand the intention behind removing the whole column of ‘un’.

Why Sir hasn’t interpreted it with the forward fill or backward fill or by any other method, since we can loose the potential insights.

Question 2 - In the below attached image, instead of taking the last 7 tail data, i took the whole data to get more insights and found 3 more columns with -ve values. To drop those particular columns, i have to see again and again which of the columns contribute to the -ve values and then dropped it.

Is there any simple way of dropping those columns ?

Another way would be to check for the columns which have negative values.
For this you can iterate through all the columns, and simply use the following snippet to check if column has any negative values:


Note that here i is a series.
Refer Quick way to check if the pandas series contains a negative value - Stack Overflow for reference.

1 Like