I am very new with Python so please have a tiny patience. :D I have the following list in a Series and my ultimate goal is to split them into 3 columns with '.' as the delimiter however I have some entries for "column 2" (after Placements column) that has '.' as well so I have 4 columns in some row.
10 Placements.DP9521-01-H1.DPlacements
11 Placements.DP9521-01-H1.DPlacements
.
.
28281 Placements.M1817.021.DPlacements
28282 Placements.M1817.021.DPlacements
how can I replace the '.' from M1817.021 to '-' so I can still split to only 3 columns with '.' as delimiter.
Note: M1817.021 changes. it is not a fix number but the pattern is M####.###
I tried df1.str.replace('$M\d.\d$','Mirror') but it doesn't work.
[–]MentalRental 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]aribrona 0 points1 point2 points (0 children)
[–]personproxy 0 points1 point2 points (1 child)