Concerning the commentsprovided by @mozway, @rawson and @somedude the answer should be:
import pandas as pd
import numpy as np
dict = {'A': ['1','2','8','4',np.nan],
'B': ['6','2','3','9','10']}
df = pd.DataFrame(dict)
df["C"] = df.apply(lambda x: ', '.join(x.dropna().unique()), axis=1)
print(df)
Result:
A B C
0 1 6 1, 6
1 2 2 2
2 8 3 8, 3
3 4 9 4, 9
4 NaN 10 10