I am trying to split a csv data containing data with arrays into multiple columns. This works perfectly for most arrays since these are whole numbers, but if I try to split following array (containing dot values) I get a problem.
So here the example. Suppose you have the following array data saved in a column called "Array"
{58.5 |58.5 |58.5 |58.5 |58.5 |58.5 |58.5 |58.5 |58.5 |58.5 |58.5 |58.5}
If I apply the following
```python
splitted_data=raw_data["Array"].str.split("\D",expand=True).add_prefix("setrwds_x")
I get the follwing result
setrwds_x1 setrwds_x2 setrwds_x4 setrwds_x5 setrwds_x7 setrwds_x8 \
0 58 5 58 5 58 5
1 58 5 58 5 58 5
2 58 5 58 5 58 5
3 58 5 58 5 58 5
4 58 5 58 5 58 5
5 58 5 58 5 58 5
6 58 5 58 5 58 5
7 58 5 58 5 58 5
8 58 5 58 5 58 5
9 58 5 58 5 58 5
10 58 5 58 5 58 5
11 58 5 58 5 58 5
12 58 5 58 5 58 5
13 58 5 58 5 58 5
14 58 5 58 5 58 5
15 58 5 58 5 58 5
16 58 5 58 5 58 5
17 58 5 58 5 58 5
It splits the 58.5 into two columns, which is wrong. I need to keep the 58.5.
Do you guys have an advice how to solve the problem?
|delimiter?