I have dataframe with 26684 rows which looks like below.
| patients | new_label |
| -------- | -------------- |
| 0004cfab | [] |
| 000924cf | [] |
| 001916b8 | [316.0,318.0] |
| 0010f549 | [] |
| 000db696 | [345.0,390.0] |
I want the result like beow.
| patients | new_label |
| -------- | -------------- |
| 0004cfab | [0,0,1,1] |
| 000924cf | [0,0,1,1] |
| 001916b8 | [316.0,318.0] |
| 0010f549 | [0,0,1,1] |
| 000db696 | [345.0,390.0] |
I want to replace every occurence of [] with [0,0,1,1] in the column new_label. I am new to pandas so I do not know how to go on to do this.I do was not able to find a a similar question onthe site.Thanks for the help.