dataframe – python pandas, how to change value in pivot table

i’m trying to make pivot table which describes which number customer chose.

original dataframe is below,

Customer Offer #

1 Smith 2
2 Smith 24
3 Johnson 17
4 Johnson 24
5 Johnson 26

in my code,
df.pivot(index=’Offer #’, columns=’Customer, values=’Offer #’)

and result is,
Smith Johnson
Offer#
2 2 NaN
17 NaN 17
24 24 24
26 NaN 26

but, i’m about to change NaN to 0, and every values(2,17,24,…) to 1.