I have the following column:
Column 1
1
10
5
100
50
1000
50000
2000
100
1000
3000
...
I would like to assign every row in Col1 wit
You can use clip:
>>> df['Column 2'] = df['Column 1'].clip(100, 1000)
>>> df
Column 1 Column 2
0 1 100
1 10 100
2 5 100
3 100 100
4 50 100
5 1000 1000
6 50000 1000
7 2000 1000
8 100 100
9 1000 1000
10 3000 1000
All values lower than 100 are set to 100; all values greater than 1000 are set to 1000.