Seems that for tokens the column name for address if Contract Address while for accounts it is Address . Not sure if this was a recent change. Unable to test running on etherscan atm due to cloudflare blocking however visually it appears that its the case.
Simple fix: Change from df.address to df['Contract Address'] for token field
Better fix: Loop through first role and dynamically determine name at runtime via checking field with address
Alternative soln is to hardcode index so we aren't dependent on column name changes only relative positioning. It's likely that position of address is unlikely to change
Seems that for
tokens
the column name for address ifContract Address
while foraccounts
it isAddress
. Not sure if this was a recent change. Unable to test running on etherscan atm due to cloudflare blocking however visually it appears that its the case.Simple fix: Change from
df.address
todf['Contract Address']
for token field Better fix: Loop through first role and dynamically determine name at runtime via checking field with address