Hi,
could you please explain what does this piece of code do? why should we use Boolean masking?
x = max(df['Gold'] - df['Gold.1'])
ans = df[(df['Gold'] - df['Gold.1']) == x].index.tolist()
and why doesn't something like this work?
ans = df[max(df['Gold']-df['Gold.1'])].index.tolist()
and what does this do?
.index.tolist()
Thanks in advance.