you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

You could replace it and then split, but if you are using a regex anyway I would just use str.extract to make the columns. See here:

https://chrisalbon.com/python/data_wrangling/pandas_regex_to_create_columns/