I have seen many links related to my question:
How to remove extraneous square brackets from a nested list inside a dictionary?
Removing square brackets from Dataframe
Removing square brackets from Dataframe
but none of that worked
below is my example:
df1
column1 column2 column3 ..... upto 'n' number of columns
[data1] data1 data1
NAN data2 data2
[data2] data3 [data3, data3, testing how are you guys hope you guys are doing :)]
[data3] data3 [data4, dummy text to test to test test test]
NAN data4 [data5]
below is my tried code:
df1[column1] = df[column1].str[0]
# not working !
# want to give df1 instead of df1[columns] because there are lot of
# columns
i want to remove only the bracket, not anything else and want to give only dataframe not along with columns because there are lot of columns !
expected output:
column1 column2 column3 ..... upto 'n' number of columns
data1 data1 data1
NAN data2 data2
data2 data3 data3, data3, testing how are you guys hope you guys are doing :)
data3 data3 data4, dummy text to test to test test test
NAN data4 data5