SyntaxFix
Write A Post
Hire A Developer
Questions
If you don't mind getting a new data frame object returned as opposed to updating the original Pandas .assign() will avoid SettingWithCopyWarning. Your example:
SettingWithCopyWarning
df = df.assign(B=df1['E'])