Assigning zero to random cells in a pandas.DataFrame
Right now, you are only setting a single cell to zero. If this is what you want, then your solution works well. However, if you want to randomly set cells to be 0, then the solutions below might be better.
For an arbitrary dimensional df:

# Create Random Mask
rand_zero_one_mask = np.random.randint(2, size=df.shape)
# Fill df with 0 where mask is 0
df = df.where(rand_zero_one_mask==0, 0)


Note: df.where is not to be confused with np.where