I am creating a data table with an assortment of columns and values. At times, if a column value is equal to a certain value, I wish to change another value in a different column. An example is listed below.
df1.loc[df1.DISCREP=='True','Number'] = 1200
Basically, if something in my column DISCREP equals the string "True", it'll change the value in the 'Number' Column to 1200. Is there a method to select and change multiple table values based on certain parameters, such as "All values in 'discrep' column starting with 'HY', will change the values in the 'number' column to 0". This also applies to values that also may be in different uppercase or lowercase order.
Sorry if this wording is a little confusing, any help would be appreciated