df = pd.DataFrame(
data=[[1, 2, "3"], [4, 5, "6"], [7, 8, "9"]],
columns=list("abc"),
index=["I", "II", "III"]
)
df["d"] = 0
for index, row in df.iterrows():
row_sum = 0
for num, item in enumerate(row):
if isinstance(item, int):
row_sum += item
df.loc[index, "d"] = row_sum
df['d1']=df.convert_dtypes().sum(axis=1)
a b c d1
I 1 2 3 3.0
II 4 5 6 9.0
III 7 8 9 15.0