You should use apply method of DataFrame API:
df['uids'] = df.apply(lambda row: set(row['uids']), axis=1)
or
df = df['uids'].apply(set) # great thanks to EdChum
You can find more information about apply method here.
Examples of use
df = pd.DataFrame({'A': [[1,2,3,4,5,1,1,1], [2,3,4,2,2,2,3,3]]})
df = df['A'].apply(set)
Output:
>>> df
0 set([1, 2, 3, 4, 5])
1 set([2, 3, 4])
Name: A, dtype: object
Or:
>>> df = pd.DataFrame({'A': [[1,2,3,4,5,1,1,1], [2,3,4,2,2,2,3,3]]})
>>> df['A'] = df.apply(lambda row: set(row['A']), axis=1)
>>> df
A
0 set([1, 2, 3, 4, 5])
1 set([2, 3, 4])