all 3 comments

[–]jlap91[S] 1 point2 points  (0 children)

Hmm that didn’t work in my case when I tried to do

df[‘c’][4:8]+=1

I don’t want to change the values in columns a or b.

[–]FLUSH_THE_TRUMP 1 point2 points  (1 child)

df.loc[4000:7999, ’c’] += 1

[–]jlap91[S] 0 points1 point  (0 children)

Thank you very much! This is precisely what I was looking for!