Im looking to see how to split a single data frame column into two columns and replace a symbol for another. For example, if the data frame y has;
| X1 |
|---|
| NA |
| 1/0:0.82 |
| 1/1:1.995 |
| 0/1:1.146 |
| NA |
| 1/1:1.995 |
I want to be able to split the data into two columns like so and substitute the "/" symbol for a".".
| X1 | X2 |
|---|---|
| NA | |
| 1.0 | 0.82 |
| 1.1 | 1.995 |
| 0.1 | 1.146 |
| NA | |
| 1.1 | 1.995 |
Whenever I try to use str.split I keep running into errors. Any help would e great.
Edit:
X1
NA
1|0:0.82
1|1:1.995
0|1:1.146
NA
1|1:1.995
How to separate it so its |X1|X2| |--|--| |NA| |1/0|0.82| etc