How to remove square bracket from pandas dataframe

Question

I came up with values in square bracket(more like a list) after applying str.findall() to column of a pandas dataframe. How can I remove the square bracket ?

print df

id     value                 
1      [63]        
2      [65]       
3      [64]        
4      [53]       
5      [13]      
6      [34]  
Solution

If values in column value have type list, use:

df['value'] = df['value'].str[0]

Or:

df['value'] = df['value'].str.get(0)

Docs.

Sample:

import pandas as pd
df = pd.DataFrame({'value':[[63],[65],[64]]})
print (df)
  value
0  [63]
1  [65]
2  [64]

df['value'] = df['value'].str.get(0)
print (df)
   value
0     63
1     65
2     64

If strings:

df['value'] = df['value'].str.strip('[]')

Sample:

import pandas as pd
df = pd.DataFrame({'value':['[63]','[65]','[64]']})
print (df)
  value
0  [63]
1  [65]
2  [64]

df['value'] = df['value'].str.strip('[]')
print (df)
  value
0    63
1    65
2    64