def assign(self, **kwargs: Any) -> 'DataFrame':
    "\n        Assign new columns to a DataFrame.\n\n        Returns a new object with all original columns in addition to new ones.\n        Existing columns that are re-assigned will be overwritten.\n\n        Parameters\n        ----------\n        **kwargs : dict of {str: callable, Series or Index}\n            The column names are keywords. If the values are\n            callable, they are computed on the DataFrame and\n            assigned to the new columns. The callable must not\n            change input DataFrame (though pandas-on-Spark doesn't check it).\n            If the values are not callable, (e.g. a Series or a literal),\n            they are simply assigned.\n\n        Returns\n        -------\n        DataFrame\n            A new DataFrame with the new columns in addition to\n            all the existing columns.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({'temp_c': [17.0, 25.0]},\n        ...                   index=['Portland', 'Berkeley'])\n        >>> df\n                  temp_c\n        Portland    17.0\n        Berkeley    25.0\n\n        Where the value is a callable, evaluated on `df`:\n\n        >>> df.assign(temp_f=lambda x: x.temp_c * 9 / 5 + 32)\n                  temp_c  temp_f\n        Portland    17.0    62.6\n        Berkeley    25.0    77.0\n\n        Alternatively, the same behavior can be achieved by directly\n        referencing an existing Series or sequence and you can also\n        create multiple columns within the same assign.\n\n        >>> assigned = df.assign(temp_f=df['temp_c'] * 9 / 5 + 32,\n        ...                      temp_k=df['temp_c'] + 273.15,\n        ...                      temp_idx=df.index)\n        >>> assigned[['temp_c', 'temp_f', 'temp_k', 'temp_idx']]\n                  temp_c  temp_f  temp_k  temp_idx\n        Portland    17.0    62.6  290.15  Portland\n        Berkeley    25.0    77.0  298.15  Berkeley\n\n        Notes\n        -----\n        Assigning multiple columns within the same ``assign`` is possible\n        but you cannot refer to newly created or modified columns. This\n        feature is supported in pandas for Python 3.6 and later but not in\n        pandas-on-Spark. In pandas-on-Spark, all items are computed first,\n        and then assigned.\n        "
    return self._assign(kwargs)
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.

Parameters
----------
**kwargs : dict of {str: callable, Series or Index}
    The column names are keywords. If the values are
    callable, they are computed on the DataFrame and
    assigned to the new columns. The callable must not
    change input DataFrame (though pandas-on-Spark doesn't check it).
    If the values are not callable, (e.g. a Series or a literal),
    they are simply assigned.

Returns
-------
DataFrame
    A new DataFrame with the new columns in addition to
    all the existing columns.

Examples
--------
>>> df = ps.DataFrame({'temp_c': [17.0, 25.0]},
...                   index=['Portland', 'Berkeley'])
>>> df
          temp_c
Portland    17.0
Berkeley    25.0

Where the value is a callable, evaluated on `df`:

>>> df.assign(temp_f=lambda x: x.temp_c * 9 / 5 + 32)
          temp_c  temp_f
Portland    17.0    62.6
Berkeley    25.0    77.0

Alternatively, the same behavior can be achieved by directly
referencing an existing Series or sequence and you can also
create multiple columns within the same assign.

>>> assigned = df.assign(temp_f=df['temp_c'] * 9 / 5 + 32,
...                      temp_k=df['temp_c'] + 273.15,
...                      temp_idx=df.index)
>>> assigned[['temp_c', 'temp_f', 'temp_k', 'temp_idx']]
          temp_c  temp_f  temp_k  temp_idx
Portland    17.0    62.6  290.15  Portland
Berkeley    25.0    77.0  298.15  Berkeley

Notes
-----
Assigning multiple columns within the same ``assign`` is possible
but you cannot refer to newly created or modified columns. This
feature is supported in pandas for Python 3.6 and later but not in
pandas-on-Spark. In pandas-on-Spark, all items are computed first,
and then assigned.
def assign(self, **kwargs: Any) -> 'DataFrame':
    "\n        Assign new columns to a DataFrame.\n\n        Returns a new object with all original columns in addition to new ones.\n        Existing columns that are re-assigned will be overwritten.\n\n        Parameters\n        ----------\n        **kwargs : dict of {str: callable, Series or Index}\n            The column names are keywords. If the values are\n            callable, they are computed on the DataFrame and\n            assigned to the new columns. The callable must not\n            change input DataFrame (though pandas-on-Spark doesn't check it).\n            If the values are not callable, (e.g. a Series or a literal),\n            they are simply assigned.\n\n        Returns\n        -------\n        DataFrame\n            A new DataFrame with the new columns in addition to\n            all the existing columns.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({'temp_c': [17.0, 25.0]},\n        ...                   index=['Portland', 'Berkeley'])\n        >>> df\n                  temp_c\n        Portland    17.0\n        Berkeley    25.0\n\n        Where the value is a callable, evaluated on `df`:\n\n        >>> df.assign(temp_f=lambda x: x.temp_c * 9 / 5 + 32)\n                  temp_c  temp_f\n        Portland    17.0    62.6\n        Berkeley    25.0    77.0\n\n        Alternatively, the same behavior can be achieved by directly\n        referencing an existing Series or sequence and you can also\n        create multiple columns within the same assign.\n\n        >>> assigned = df.assign(temp_f=df['temp_c'] * 9 / 5 + 32,\n        ...                      temp_k=df['temp_c'] + 273.15,\n        ...                      temp_idx=df.index)\n        >>> assigned[['temp_c', 'temp_f', 'temp_k', 'temp_idx']]\n                  temp_c  temp_f  temp_k  temp_idx\n        Portland    17.0    62.6  290.15  Portland\n        Berkeley    25.0    77.0  298.15  Berkeley\n\n        Notes\n        -----\n        Assigning multiple columns within the same ``assign`` is possible\n        but you cannot refer to newly created or modified columns. This\n        feature is supported in pandas for Python 3.6 and later but not in\n        pandas-on-Spark. In pandas-on-Spark, all items are computed first,\n        and then assigned.\n        "
    return self._assign(kwargs)