SyntaxFix
Write A Post
Hire A Developer
Questions
case the column isn't string, use astype to convert:
df['col'] = df['col'].astype(str).str[:9]