set value based on column

Solutions on MaxInterview for set value based on column by the best coders in the world

showing results for - "set value based on column"
Nicolás
26 Apr 2020
1In [41]:
2df.loc[df['First Season'] > 1990, 'First Season'] = 1
3df
4
5Out[41]:
6                 Team  First Season  Total Games
70      Dallas Cowboys          1960          894
81       Chicago Bears          1920         1357
92   Green Bay Packers          1921         1339
103      Miami Dolphins          1966          792
114    Baltimore Ravens             1          326
125  San Franciso 49ers          1950         1003
Jazmín
07 Nov 2017
1df.loc[df['c1'] == 'Value', 'c2'] = 10
Maximus
21 Jun 2017
1df.loc[(df.Event == 'Dance'),'Event']='Hip-Hop'
2df
3
queries leading to this page
set the value of a column in sqlhow to replace values in pandas based on conditionreplace values in dataframepandas replace values columnreplace value in anotrher column based on value in anopther column pandas dataframe pythonreplace column values in pandas based on conditionset column of dataframe based on conditionhow to change value of one column in a pandas cp 3bumn based on value of another columnpandas change value of cell based on conditionpd replace values based on conditiondataframe replace values in specific columnpandas change value in column based on conditionset column value in sqlpandas replace column values based on conditiondataframe replace value in rowpandas replace value in one columnreplace a column certain values with other panda dataframepandas assign new value based on conditionpandas replace data with some values in columndataframe 2b update column based on conditionconditionally replace values in pandas dataframedataframe replace values with 1pandas replace values in column according to multiple conditionreplace all values in dataframe pandas based on conditionpandas set column based on one indexreplace dataframe column valuesreplace values in column pandas based on conditionpandas creplace column value with conditionpython pandas replace with conditionreplace condition pandas dataframeset value based on value in another columnpandas replace values in column for selected rowspandas replace value in column based on conditionpython pandas conditionally replace column valuespandas replace some values in column based on conditionchange value on dataframe base on condition on same columnspandas replace specific values in column based on conditionpandas dataframe change value conditionhow to replace values in a column if my condition true in r dataframereplace a column values with certain conditionpandas replace value in dataframechange values of column based on condition pandasreplace condition in pandaspandas dataframe replace values in column based on conditionchange value in column based on condition pandaschange values in dataframe by conditionreplace column value pandas if conditionpandas update cell value based on conditionhow to replace certain values in a column pandaspandas replace value by conditionpandas conditionally replace valuesset value in dataframe based on conditionpandas how to replace a specific value in all columnsreplace values within certain rows pandas based on conditionreplace one column values pandaspandas change value in column if conditiondataframe replace value with otherdataframe update column value only based on conditionreplace values by condition pandasdataframe replace value with conditionpandas set value if another columnhow to change column value with condition in python pandaspandas change value on conditionhow to replace value with another value in pandas for full dataframepandas dataframe update all column values based on conditionreplace values in dataframe with conditionassign panda column value to variable that meets conditionpython change substitute value in dataframe on conditionpandas update column based on conditionreplace pandas column values based on conditionpandas replace values in column by associated values from another columnchange value in column based on another column value pandas str replacedataframe replace value on conditionreplacing values in a column based on a functionpandas update value based on conditionpd replace column on conditionset a value for a column based on conditionassign value if value in other column presentassign value of a column to another column pandasdf replace value by conditionhow to replace values in 22other 22 pandaspandas set value by conditionpython dataframe column replace valuereplace one value with another in pandas depending on the value in another column pandasreplacing with any value in dataframe pythonchange value in pandas dataframe based on conditionpandas replace values with conditionpandas replace value when they are on another column basedpandas set value where conditionreplace value pandas columnpd replace value python take one column value ifpandas replace values in column to string based on conditionin df if condtion of column is true replace another columnchange values inplace by condition pandasreplace a value in dataframe based on conditionchange certain row values of dataframe based on condition pandaspandas change column values by conditiondataframe where value equals changehow to replace dataframe value by other dataframepython change values in column based on conditionconditional assignment of column value based on entries in other columns dataframepandas replace values in column based on another columnreplace a value in a data frame based on a conditional 28 60if 60 29 statement rchange values in pandas column based on conditionpandas set column values based on conditionreplace a column value in pandas with other column having same valuepython dataframe set value based on conditionreplace a value in a data frame based on a conditional 28 60if 60 29 statementpandas replace certain values in columnset values of items in column to new value pandaspandas change a data value where conditionupdate column value in dataframe with condition pythondf change value based on conditionif value in pandas is then replacehow to change a column value based on condition pandaschange row values in pandas dataframe conditionpandas replace value in column if condition applypandas dataframe replace column with new values if elsecreate pandas column based on conditionreplace a value column by condition pandasdf change column value if conditioncahnge all values equal to one pandasreplace values on column pandas based on codition on from another columnpandas replace values in dataframe with values from another dataframedataframe replace one value with anotherreplace certain values in a column pandashow to replace a column value with another value in pandasdataframe change values in column with ifassign value to dataframe column based on conditionpandas set value based on conditiondataframe on row change the column value with conditionassign value to column based on condition pandasmultiple criteria for replace values in pythonpandas replace column values conditionallydataframe replace valuepandas column replace if containsrepalce values in dataframe with certain character based on condition pythonhow to change values in pandas dataframe based on conditionreplace value of column where condition pandasreplace a column value based on other column value pythondataframe replace valueschange value based on condition pandasassign column based on valuevalue change panda columns on logicpandas change value in column based on another column matcypandas change column value with conditionpandas replace values in rows based on conditionupdate column value with condition in pandas dataframe elsereplace column values in pandas with ifconditional replace row value pandasreplace one value in pandas dataframereplace a particular value in column of dataframepandas replace value if condition based on another columnhow to use loc for assigning values based on conditionspandas replace columns values matchingchnage column values of dataframe based on conditionchange values in row on condition pandasreplace all cell of df with condition pythonupdating the values of column based on conditions of other columns pandaspandas update cell based on conditionreplace values in column where condition is metreplace one value to other in dataframe pandaschange value in dataframe by conditionreplace value in dataframe based on conditiondataframe change value if conditionconditonal replace row value pandasfind and replace row pandashow to replace value in column pandaspandas dataframe replace values multiple conditionscolumn values replace in pandasreplace column value with another column value if condition fitpython pandas update column values based on conditionreplace values in column pandashow to replace a value according to a condition pandaspandas replace various values in columnpandas replace entire row based on valueloc not replacing all rows based on conditionpandas replace conditionpandas if value in column then replace loc python conditional cell valuepandas dataframe change row values based on conditionpandas replace each value in column applyreplace column values in pandas with forreplace value in column based on condition pandasdataframe replace valuespandas dataframe replace values with conditionpandas set column value based on another column conditionchange every bool values in column pythonpandas change values in column by conditionreplace values in column pandas based on value in another columnpanda replace valuespandas change values of column based on conditionpandas conditionally update columnpandas replace column based on conditionpandas dataframe replace column valuespandas series replace values based on conditionwhen a condition is true set values of column pythonpython replace dataframe column values with value from if conditionreplace values in one dataframe with matching values in other dataframe pandashow to assign the values of a column to a column of another dataframepandas replace one columns with another column rows based on conditionpanda replace on conditionpd replace value in columnupdate value in pandas dataframe based on conditionhow to change all values to a certtain value in pythonpandas assign value to column based on conditionpandas replace values in columnreplace column values on conditionreplace one column in a datafram if other column matches with dataframechange the value in a columns in dataframe pandas with if conditioncolumn change value based conditon pandasreplace values in dataframe from another column pandashow to replace values with other dataframereplace row text in column pandasreplace a certain value in a column within a pandas dataframe with another dataframe set value by conditionhow to change column values based on conditional pandaspandas change the column value based on conditionpython dataframe change value if conditionpandas if value in column then replace elsereplace rows value in dataset pythonpython dataframe update column values based on conditionreplace value in column if pandaspandas dataframe alter column with value based on conditionpandas replace where condition is truereplace values in df based on conditionhow to change the column values in pandas dataframe based on condition pandas update column value based on conditionpandas replace value in dataframe where column matches other dataframepandas set column if other column equalsdf replace value on cell conditionpandas boolean column based on values bigger smaller other columnconditionally replace values in pandas columnreplace values in one column with another based on a condition from a third columnpandaspd replace data on conditionreplace row values in pandas based a conditionpython pandas replace column values based on another columnpandas change column where conditiondf assign value base on conditionpandas column replace valueshow to change values in dataframe based on conditionreplace values on columns with something else pandashow to rename columns in pandasreplace value in pandas with conditiondataframe assign value based on conditionchange all values in a column pandas with conditionreplace values in a column only if conditionfind rows where condition and assigne value pandaspandas replace value when conditionpandas set column value with conditionreplace value dataframedataframe replace rows based on conditionpandas set a value for column on conditionpandas apply function to column and replace valueshow to replace a value with another in a column in pandaspd change values in row based on conditionpython pandas change column value on conditiondataframe replace where conditionpandas replace a value in a columndataframe replace value in columnhow to replace a df value with with other valuedataframe if value is in other dataframe then replacepandas replace data in specific columns with specific valuespandas quickly replace data in column if matchpandas dataframe replace values in specific columns with conditionpandas modify column values based on conditionif there is a value in column then 1 else 0 in pythonpandas dataframe replace value in column if it contains a valuepandas replace values from other df in row based on conditionpandas modify value based on conditionpandas replace values under conditioncheck column data if match in pandas and replacepandas replace specific values in columnreplace a value with values above that pandanas pandas change column based on conditionpandas condition column value to replacecondition based value update pandasreplace string with other column for a condition in python dataframepandas replace a value in one column onlybased on condition setting a value in dataframechange a single value in pandas dataframepandas replace values in column based on the value of another columnreplace values based on condition in entire dataframe pythonpandas replace values with condition in all columnspandas and condition replaceupdate column value based on condition pandasdataframe apply replace every value in columnhow to change value in pandas dataframe column with conditionreplace all values in a column pandas with another valuedf replace column values if conditionpandas change values with conditiondataframe change value of column based on conditionchange a cell value where this condition is true pandasreplace value with condition pandaspandas change all values based on conditionhow to replace column values in pandas based on conditionreplace values in pandas with multiple conditionhow to replace a value in a column with another value pandasdataframe replace values with conditionpandas change cell values on a column based on conditionstr replace value in column based on another column pandasreplace values in dataframe r based on conditionpython pandas change value based on conditionchange column values in pandas based on conditionpandas change df values conditionallyif replace value if pandaspython pandas replace based on conditionreplace values in specific columns pandaspandas change value if conditionpandas dataframe update a column values from another datafrome based on conditionpandas change value of column based on conditionreplace data from another column based on condition pandasreplace column values based on condition pandashow to change column value with condition in python pandas with functionpd replace value under conditionupdate column value by condition pandas if else 2021pandas change values in column conditionchange row value based on condition pandasreplace a value on specific column pandaspandas set values based on conditionpandas replace all values with conditionpandas update column values based on conditionreplace values in pandas colunreplace all values by other value dfpandas replace values based on other valuepandas find value in column and replacepandas replace values in column based on condition from another columnconditional change values of column pandaspandas replace column values with conditionpandas replace each value in column 3fpandas dataframe replace values in one columnupdate column with condition pandasget all values is a data set columndataframe update column value based on conditionreplace values in dataframe based on condition rpython set cell value with another column valuepython pandas replace specific column valuespandas replace value from another dataframepandas dataframe replace value in one columnpandas replace values in a column with another valuepandas replace value with anotherreplace each value in dataframe series with a value from that valuepandas replace all values in dataframe based on conditionpandas print column values with conditionpandas replace values in column with another columnreplace some values in column pandasreplace values in column where column based on condition pandaspandas repace by value of other dataframepandas replace value if different than conditionspandas conditional replace values in a seriesreplace all values in a column in pandas with conditionpandas replace value where conditionreplace values with condition pandaspython set cell value with conditionreplace values in dataframe conditionalreplace one value in pandaspython dataframe replace values in column row ifpandas assign column based on another columnreplacing values in pandasmodify specific value in dataframe based on filterpandas dataframe change value based on conditionreplace pandas with condition columnreplace value in dataframe rowpandas replace values in column that start withreplace values pandas conditionreplacing the value with another value in pandashow can i replace 25 in values columns pandaspandas replace value based on where conditiondf replace value on conditionchange colum value pandas by conditionpandas change values in column to 1 if valuepython set value based on a columnpandas change colummn value based on conditionhow to edit dataframe values by a given condition pythonif else on column pandas change value thenassign the value to columnsfind first value in one column and change another column from that valueupdate column in pandas dataframe based on conditionpandas change value in row ifsubstitute in all dataframe certain value with an other onepython pandas set value ifhow to replace values of a column with condition in pandaschange values based on other column pandas using str replacereplace value if some condition pandaschange column value by condition pandaspython replace value in dataframe with conditionpandas replace entry based on a conditionreplace value in column pandasreplace values in columns with pandasconditional column pandas change valuespandas iloc replace based on conditionpandas change column value if conditionpython assign vale to column where row value equalpandas update a column based on conditionpandas change value of a column based another column conditionupdate dataframe row column value based on conditionpandas dataframe replace values in columnpython series replace values based on conditionchange value of one column in sqlset value based on columnset df where conditionpd replace value with python dataframe set value by conditionreplace all values of col by other value pandaspandas replace values by columnpandas replace value in column with anotherpandas change row value based on conditionreplace a value if column has a valuedataframe replace all values with conditiondataframe replace if conditionhow to change value in dataframe if meets conditionreplace value in dataframe with conditionpandas change values in column based on conditionpandas replace values based on condition in seriesreplace data from another column based on conditionpandas replace column value based on conditionupdate pandas column based on conditiondataframe replace column values based on conditionpython replace dataframe valuespandas replace value from another dataframe from two conditionspandas replace one columns with another column values based on rowdf replace subset of the column valuefind 7c 7c in datframe column and replace it with a value column set a valuepandas select and replace all values by conditiondataframe update value with conditionreplace value in dataframe if conditionreplace a dataframe valuereplace values using condition in pandaspandas replace in some columnspandas replace brow by column values based on conditionpython replace column values by conditionreplace a value with condition in dataframe pythonchange value based on condition in another clumn pandaspandas replace value in text column if conditionpandas replace all values in column with one valuechange values in dataframe based on conditiondo not replace if condition pythonpandas dataframe replace values in dataframe replace values in columnchange value in dataframe based on condition pythonhow to replace entire column with specific values in dataframereplace values in dataframe based on the valuereplace values in dataframe by conditionreplace inf values in pandas colpandas dataframe 2b update column based on conditionpython dataframe replace value in columnreplace some values in python dataframe based on certain conditionpandas replace column values conditionreplace column value based on condition pandaspython change column value where conditionpandas replace values in column based on conditionset value in column based on condition pandasr replace a value in dataframe conditionalinstead of replace existing dataframe gets rows added replace row values in pandasreplace with condition in pandaspanda dataframe replace values in column with conditionreplace values dataframepandas change data column with conditionhow to set column value based on condition pandashow to replace values in pandas column using conditionchange value of column with condition on another column pandaschange column values based on condition pandaspandas change cell value based on conditionpandas replace certain row of columns based on conditionpandas change values in certain rowschange value column condition pandaspandas replace values in column based on condition with another columnupdate all objects in column pandas with conditionhow to replace value with certain value in dfupdate value in a dataframe with conditionspython find and replace by condtion dfdataframe change column value based on conditionpandas assign column value based on conditionpandas set column based on conditionpython pandas replace values based on other columnsreplace dataframe value based on conditionpandas change column values if conditionpandas replace value based on conditionreplace value in dataframe based condition 27pandas replace value in columnpandas replace values in column based on condition from another dataframerepalce value in dataframe on conditionchange column value if row contains pandaschange value in df column based on conditionpandas dataframe change value by conditionpandas creplace column value with multiple condition how to change values of a dataframe column based on conditions in pythonchange value for column for rows based on condition pandasreplace all values in a column pandas with another value based on condition pandas change value based on conditionpandas replace numeric conditionspandas replace values in column if conditiondata column set valuedataframe if value replace withreplace values of a column in pandas dataframe with another dataframereplace a particular value in dataframepandas dataframe replace value with anotherhow to replace a value in one column based on condition pythonset column valuereplace column value condition pandaspython pandas replace all values in columnhow to replace values in a column based on a condition in pythonpandas replace value in row and columnreplace values in dataframe using if statement in rstudiopandas create new column and assign value based on conditionpandas replace column values applypandas substitute single value that meets conditionpandas conditionally replace values if column is in listpandas replace values based on conditiondataframe change value with conditionpandas transform column where conditionpandas change row values based on conditionpython replace value if how to replace some values in pandas on conditionreplace value with other value pandaschange all values of a column pandas based on conditionpandas replace values by conditionreplace column values pandas conditionhow to change column data by condition pandas 2021replace row values in a dataframe by mean group conditional 22python 22replace a particular value with other value in pandaspandas update column based on multiple conditiondataframe column value replace pandaspandas replace column values with another columnpandas replace value based on another columnpandas replace value with another column if conditionreplace value in column pandas based on conditionreplace a value with another value pandaspandas replace values with another set of valuespandas replace value on conditionpandas replace value with value from another rowreplace value based on condition pandaspandas replace value if conditionpandas replace value in column if conditionpandas change column value based on conditionupdate column value with condition in pandas dataframeassign value to df based on condition pandaspandas replace values in a columnreplace based on condition pandaspython pandas replace values in column with conditionpython dataframe replace values with conditionreplace value if df conditions pandaspython pandas assign value based on conditionreplace values in a column by condition pythondataframe replace if column valuespandas replace value in specific columndataframe replace values based on conditionspandas if value in column then replace in another columnreplace value at specific column for different row in pandas dataframepython replace value in column based on conditiondata frame is value replace withdataframe replace all values in columnpandas replace values in dataframe based on conditionchange column value based on condition pandasreplace value if condition pandaslook for value in other column and if match replace pandasvalue change panda column on logicchange column value of a specific row pandas with conditionreplacing values of one column pandasreplace a value in dataframe with another valuereplace values in dataframe based on conditionhow to modify df so that only true values remain in dfpandas how to replace values with 22other 22dataframe change value based on conditionpandas replace based on conditionreplace values in df based on criteria of a different columnreplace values in column dataframechange column value based on condition pandas np wherechange all values in a column pandas with concatenatepandas replace column values with another dataframe if matchreplace values in pandas dataframe with conditionpandas replace string values in column based on conditionchange value of a column according to a valuereplace based on conditionhow to replace column value in pandas dataframepandas replace values byhow to assign value to a column based on condition pandasreplace condition pandaschange column value based caculation two on another column pandasreplace 3d true in pandasdataframe column replace valuespandas replace value if elsepandas change column value based on condition of another columnpandas replace cell value if conditionreplace values in row based on condition pandasgive new value based on condition pandasreplace values in pandas columnreplace with true in pandas where value equal to some valuepython dataframe change value by conditiondataframe change column values based on conditionpandas replace name of row based on conditionset the value of a column to category and change the value by condition pandaspandas replace one columns with another column values based on conditionpandas replace value in column with conditionreplace value in column based on another column pandasdataframe replace value by conditionchange rows in dataframe based on conditionassign a value to a column based on another column pandaspandas dataframe replace values in one column if conditionpandas replace values in column based on multiple conditionset value of columnpd replace valuespython replace values in column based on conditionpandas condition based substitute column values using numpypandas replace specific values in column conditionchange value with condition pandasreplace values in pandas dataframe based on conditionpanda change col value on conditionpython pandas change values in dataframe conditiondataframe replace value with conditionaldataframe replace column valuespandas change row value if conditionpandas substitute value in columnchange value of a column based on a condition pandasconditional data replace pandaspandas replace column valuespandas replace all df conditionreplace column value if sstring present condition pandasdataframe keep column depending on conditionpandas set value where value equals another column in different dataframepandas replace value in a columnreplace value after checking in pandasif value in dataframe replacepandas conditional replacechange values that equal something to something else pandasreplace values in column pandas with conditionspandas how to change one value in a column to something elsechange value in pandas column based on condition on another columnreplace values based on df pandaspd column values based on conditionset column value from another column dataframepandas replace column values with new valuespython set column value based on conditionhow to replace all values higher than pandas conditionpandas replace value by condition 3fchange value pandas conditionreplace value in dataframe if equals thenset value in df based on conditionpandas replace rows wherehow to replace values in pd dataframe with values calulatedpanda replace column valueschange cells in column condition pandaspandas replace values if conditionreplace values in column based on condition pandaspandas replace column values with functionreplace pandas column valuespandas update cells with conditionhow to assign a list of values on base of where condition pandas dataframepandas dataframe replace valuesreplace column values pandas with values from other columns pandaschange value of pandas column based on conditionchange value of column based on condition pandasreplace conditional with dataframepandas replace string in column based on conditionpandas conditionally change column value by rowset column value based on condition pandasdataframe replace value by condition on other columnsreplace all values condition in entire pandas dataframereplace single value in dataframe pythonreplace a certain value in a column with another in pandaspandas replace null values in column based on condition on another columnupdate column based on condition pandasreplace values with loc pandasreplace value by condition pandaspandas replace column values with another dataframepandas replace column values with other dataframe columns valueshow to replace value in pandas on conditiondf change conditionalpandas replace value when they are on another columnchange value of a column with if condition in pandasr dataframe replace values from in one column in another set a particular column valuepandas change values based on conditiondataframe set value based on conditionpandas replace values conditionpandas update cell value based on condition in listchange dataframe value based on conditionhow to change the dataframe with conditionschange pandas column value based on conditionhow to replace value in a column by condition in dataframe in pythonreplace in python if statement in dataframereplace an integer value in dataframe with string when met a conditionpandas replace values in row based on conditionpandas replace with conditionhow to replace a column values by conditionpandas replace value with other valuechange values in column based on condition pandaspandas replace all columns df conditionpandas change column values if condition elsepandas replace value with condition in all columns in same rowhow to replace a value in dataframe with condition checkr replace values based on match with other dataframepandas dataframe set column value based on conditionhow to replace a value in dataframe using if conditionreplace values based on condition pandashow to change values in a df based on conditionupdate column condition pandas in pythonpandas if condition change valuepandas replace column values with another column based on conditionpython pandas dataframe replace column values based on listchange just one value in a dataframechange value if condition pandashow to replace values from the dataset by certain conditionhow to replace all the value by something else in a pandas dataframechange dataframe column value based on conditionchange column values in dataframe column in python based on conditionreplace value dataframe pythonreplace by condition pandashow to replace a column in dataframe python using if conditionpandas replace values in a column based on conditionreplace a value pandas with condictioncheck if value in rows of dataframe column python then replacepython pandas dataframe replace with conditionhow to replace a value in dataframe using applypandas condition based substitute column valuespandas replace on conditionreplace value with another value pandaschange value of dataframe based on conditionreplace a column value if other column matches value pandasdf set 2b1 to existing valueif column value start with in pandas replacepandas modify row with conditionreplace value in dataframe pandas by condtitonpandas change value based on presence in listchange value in dataframe with conditionchange column based on condition pandasreplace values in pandas column based on another dataframepandas replace values in column based on condition listpandas replace values with other valuespandas dataframe update column values based on conditionchange current value of a column based on condition on other column pandas dataframepanda replace a value in a columnreplace a value with a if condition pandasreplace some valyes in one column in a datafram if other column matches with dataframereplace all values pandas dataframe conditiondf replace with certain conditionreplace the another column value based on one column pandaschange value of all cells by a conditionpandas replance only rows ion conditionsreplace column values dataframe conditionpandas assign value based on conditionchange certain row values of dataframe based on condition pandapandas change value by conditiondataframe modify a cell value based on filterpandas replace column values from another valuepandas replace value int row if conditionset the columns equal to that of a dataframepandas how to replace values in a columnhow to replace particular column value in pandas dataframepandas replace value with value from other columndataframe change values by conditionpandas update value by conditionpython dataframe replace column values using dictionaryreplace values from one dataframe to anotherpandas change column values based on conditionhow to change the value of a column in pandas dataframe based on conditionsreplace value in dataframereplace certain value in column pandasreplace all values in a dataframe conditionupdating column value based on condition pandasdataframe apply replace valuepandas replace specific values in column condition endswith change row value with condition pandaschange value of cell matching a condition pythonhow to change a single value in a dataframesql set column valuereplace values in dataframe columnpandas set column value based on 2 columnsreplace values in pandas dataframe by valuereplace row content in python based on conditionpandas replace values based on values from another columnpandas replace values in column 3freplace value pandas dataframepandas replace row column valuepandas change value in column conditionpandas if 2felse replace column contentsreplace values in specific columns pandas with specific valuesreplace value column pandaspython str replace value in pandas row based on another columnchange value in dataframe based on conditionupdate multiple values in pandas dataframe based on conditionreplace conditionals dataframeshow to make change values in a dataframe based on conditionset value based on column