import pandas as pd
# create a sample DataFrame
df = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6], 'c': [7, 8, 9]})
# replace both diagonals of the DataFrame with zeros
for i in range(len(df)):
df.iloc[i, i] = 0
df.iloc[i, len(df) - i - 1] = 0
df