df = pd.concat([df, C], axis=1) Whendfis on the right side, it refers to "the object that is associated with the namedf" (meaningAthenB). On the left side,dfsimply represents the namedf. As a result, your loop does not make any changes to the original objects. You can use A...