How to add 91 to all the values in a column of a pandas data frame?

2

Consider my data frame as like this

S.no Phone Number
1 9955290232
2 8752837492
3 9342832245
4 919485928837
5 917482482938
6 98273642733

I want the values in "Phone number" column to prefixed with 91 If the value has 91 already then, proceed to the next value.

My output

S.no Phone Number
1 919955290232
2 918752837492
3 919342832245
4 919485928837
5 917482482938
6 919827364273

How could this be done?

Share
1
  • 1
    the last input has a 33 but output has a single 3, i assume its a typo – anky Apr 21 at 15:49

Comments

Popular posts from this blog

Meaning of `{}` for return expression

Get current scroll position of ScrollView in React Native

flutter websocket connection issue