Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

change value in dataframe

# change value in column_where_to_change and in the row where column_name == column_value
df.loc[df['<column_name>']=='column_value', '<column_where_to_change>'] = '<new_value>'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #dataframe
ADD COMMENT
Topic
Name
1+5 =