@@BrendanMetcalfe lol yea i think i figured it out. I ended up creating a list inside the function and and appending the min values if they were less than zero, and then returning the length of the list. I don't know why my teacher wanted me to do it this way but at least I got it ig
@@BrendanMetcalfe no, I mean there's a list with numbers [0,2,-4,5,-7,-11,3] and my task is to replace all the negatives to their numbers in a list so it will look like [0,2,2,5,4,5,3]
@@АтаРозыев-ы8з Yes I understand.. use the abs() function and and an if statement stackoverflow.com/questions/1585322/is-there-a-way-to-perform-if-in-pythons-lambda
Hello came across this video while looking for a video explaining how to remove negative 1(-1) in a dataframe. Any ideas? i will really appreciate
Thanks. This was useful
Would you be able to do this with recursion? If so, how?
No idea man 😂
@@BrendanMetcalfe lol yea i think i figured it out. I ended up creating a list inside the function and and appending the min values if they were less than zero, and then returning the length of the list. I don't know why my teacher wanted me to do it this way but at least I got it ig
How to replace negative numbers to their indexes using Lambda function?
If you mean converting, say, -5 to 5, use the abs() built-in function
@@BrendanMetcalfe no, I mean there's a list with numbers [0,2,-4,5,-7,-11,3] and my task is to replace all the negatives to their numbers in a list so it will look like [0,2,2,5,4,5,3]
@@АтаРозыев-ы8з Yes I understand.. use the abs() function and and an if statement stackoverflow.com/questions/1585322/is-there-a-way-to-perform-if-in-pythons-lambda
@@BrendanMetcalfe thank you sir!) You are the best🔥