SyntaxFix
Write A Post
Hire A Developer
Questions
Your problem can easily be solved by converting it to the object first. After it is converted to object, just use "astype" to convert it to str.
obj = lambda x:x[1:] df['id']=df['id'].apply(obj).astype('str')