How do I change the value in a column given a Boolean (in Python)?
you coutd try:
myDataFrame = np.where(myDataFrame < 10, 5, myDataFrame)
this checks where the value is lower than ten. if it is it sets it to five, else it just sets the value to what it already was.
In a data frame, when the value of a given column is below 10, I need to change all the values till the end of the column to 5.
so let's say these are the values of the column:




A




134


413


12


81


9


483


93


30




I would need it to become:




A




134


413


12


81


5


5


5


5




I apologize if I didn't explain this well, I'm new to coding. Thanks for all the help!