im trying to extract a default string value from a string column but without sucess.
This is the column with some string values:
Unnamed: 0
57 PA.SQNTURBO.Bb20.0-Serquinutri Turbo - Bb20 L
58 PA.SQNTURBO.Fr 1l.0-Serquinutri Turbo - Frasco 1l
59 PA.SQNZ10.Bb 20.0-Serquinutri Zinco 10 - Bb 20 L
60 PA.sqnbor.Bb 20.0-Serquinutri Serquibor - Bb 20 L
61 PA.sqnbor.Bb 5.0-Serquinutri Serquibor - Bb 5l
What im trying to reach:
Unnamed: 0
57 SQNTURBO.Bb20
58 SQNTURBO.Fr 1l
59 SQNZ10.Bb 20
60 sqnbor.Bb 20
61 sqnbor.Bb 5
this is my unsucess code:
all_months["Unnamed: 0"] = all_months["Unnamed: 0"].str.extract(r"/.(.*)./", expand=False)
all_months
and the result...
Unnamed: 0
57 NaN
58 NaN
59 NaN
60 NaN
61 NaN
Could you guys help me? i have a kinda difficult with regex and it just blow my mind when i have to deal with it.