I have this column:
C-042-00000017276
F-099-00000201997
F-98-204009
I want this column to be:
C-42-17276
F-99-201997
F-98-204009
I know how to extract the data through regex expression and I can solve it iterating over rows, But I want to do it more pandas style:
I am trying this for extract the pair of digits of the string between the '- symbols.
df['column'] = df['column'].str.replace(r'-.*',df['column'].str.extract(r'(-.*-)',expand=False).str.replace('-','').str.lstrip('0'))
but I get:
TypeError("repl must be a string or callable")
any suggestion with that?