Challenge
Let's replace the negative values in the 'empinch'
and 'invsth'
columns with zeros using the .where()
method.
Task
Swipe to start coding
- Select the
'empinch'
and'invsth'
columns. - Apply the
.where()
method to chosen columns. - Set the condition what values must be replaced (these must be negative values). Remember, values that don't satisfy this condition will be replaced.
- Set the parameter what values must be used instead of replaced ones.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 5
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.56
Challenge
Swipe to show menu
Let's replace the negative values in the 'empinch'
and 'invsth'
columns with zeros using the .where()
method.
Task
Swipe to start coding
- Select the
'empinch'
and'invsth'
columns. - Apply the
.where()
method to chosen columns. - Set the condition what values must be replaced (these must be negative values). Remember, values that don't satisfy this condition will be replaced.
- Set the parameter what values must be used instead of replaced ones.
Solution
Everything was clear?
Thanks for your feedback!
Awesome!
Completion rate improved to 2.56SectionΒ 2. ChapterΒ 5
single