df.assign
allows you to assign values to multiple new columns in one line of code.
In the code above, I first created col3
then usecol3
to create col4
in one line of code.
df.assign
allows you to assign values to multiple new columns in one line of code.
In the code above, I first created col3
then usecol3
to create col4
in one line of code.