Answers for "How can i replace a number in pandas"

9

replace values of pandas column

df.loc[df['column'] == 'column_value', 'column'] = 'new_column_value'
Posted by: Guest on June-26-2020
0

pandas find fifth caracter in field and change cell based on that number

data['result'] = data['result'].map(lambda x: x.lstrip('+-').rstrip('aAbBcC'))
Posted by: Guest on October-25-2020

Code answers related to "How can i replace a number in pandas"

Python Answers by Framework

Browse Popular Code Answers by Language