pandas.DataFrame.assign — pandas 1.3.5 documentation
pandas.pydata.org › pandaspandas.DataFrame.assign ¶. pandas.DataFrame.assign. ¶. Assign new columns to a DataFrame. Returns a new object with all original columns in addition to new ones. Existing columns that are re-assigned will be overwritten. The column names are keywords. If the values are callable, they are computed on the DataFrame and assigned to the new columns.