df = pd.DataFrame(index=list(range(0, 3)), columns=list(range(0, 3)))
df[1][2] = 'a'
f = lambda x: 'o' if pd.isnull(x) else x
df.applymap(f)
How to use applymap, lambda and dataframe together to filter / modify dataframe in python?