import numpy asp
import pandas as pd
np.random.seed(100)
df = pd.DataFrame(np.random.choice([11,220,55,52,44], size=(5,5)), columns=list('ABCDE'))
print (df)
df.loc[df['C'] == 11 , 'E'] += 1000
#C column to E column for row 11 += 1000
print (df)
'''
A B C D E
0 11 11 52 11 55
1 44 55 55 55 55
2 220 11 11 44 52
3 44 55 11 52 220
4 55 52 44 44 220
A B C D E
0 11 11 52 11 55
1 44 55 55 55 55
2 220 11 11 44 1052
3 44 55 11 52 1220
4 55 52 44 44 220
'''
Next time, when you post a question, please send us the source code.
I can't check if you use Pandas or not.
© 2024 OneMinuteCode. All rights reserved.