One of the columns of my dataframe looks something like this:
[application]
blah/3.14
xyz/5.2
abc
...
...
(representing software/version)
I'm trying to achieve something like this:
[application] [name] [ver]
blah/3.14 blah 3.14
xyz/5.2 xyz 5.2
abc abc na <-- this missing value can be filled in with a string too
...
...
As you can already tell, I'd like to split the column into two, using '/' as a delimiter. A stack overflow solution suggests something like this:
tmptbl = pd.DataFrame(main_tbl.application.str.split('/', 1).tolist(), columns= ['name', 'ver'])
main_tbl['name'] = tmptbl.name
main_tbl['ver'] = tmptbl.ver
Which looks great at first, but it crashes for columns without '/', such as 'abc'.
What else can I try?