Зміст курсу
Data Manipulation using pandas
Data Manipulation using pandas
Challenge
Let's replace the negative values in the 'empinch'
and 'invsth'
columns with zeros using the .where()
method.
Swipe to show code editor
- 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.
Дякуємо за ваш відгук!
Challenge
Let's replace the negative values in the 'empinch'
and 'invsth'
columns with zeros using the .where()
method.
Swipe to show code editor
- 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.
Дякуємо за ваш відгук!
Challenge
Let's replace the negative values in the 'empinch'
and 'invsth'
columns with zeros using the .where()
method.
Swipe to show code editor
- 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.
Дякуємо за ваш відгук!
Let's replace the negative values in the 'empinch'
and 'invsth'
columns with zeros using the .where()
method.
Swipe to show code editor
- 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.