посмотрите на это предложение, оно может работать для вас.
import pandas as pd
data = [[22, 0, 44, 5, 6], [12, 3, 56, 0, 0], [0, 0, 1, 0, 0], [1, 2, 0, 0, 0]]
df = pd.DataFrame(data)
# we ignore the first column since we will use it to compare
columns = df.columns[1:]
# new dataframe for convenience purposes
new_df = df.copy(deep=True)
# iterate through each column and compare the 1st and the iterating column and if both above zero make True or False
for i in columns:
new_df.iloc[:, i] = (df.iloc[:, 0] > 0) & (new_df.iloc[:, i] > 0)
# check results
new_df