def round(self, decimals: Union[(int, Dict[(Name, int)], 'Series')]=0) -> 'DataFrame':
    "\n        Round a DataFrame to a variable number of decimal places.\n\n        Parameters\n        ----------\n        decimals : int, dict, Series\n            Number of decimal places to round each column to. If an int is\n            given, round each column to the same number of places.\n            Otherwise dict and Series round to variable numbers of places.\n            Column names should be in the keys if `decimals` is a\n            dict-like, or in the index if `decimals` is a Series. Any\n            columns not included in `decimals` will be left as is. Elements\n            of `decimals` which are not columns of the input will be\n            ignored.\n\n            .. note:: If `decimals` is a Series, it is expected to be small,\n                as all the data is loaded into the driver's memory.\n\n        Returns\n        -------\n        DataFrame\n\n        See Also\n        --------\n        Series.round\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({'A':[0.028208, 0.038683, 0.877076],\n        ...                    'B':[0.992815, 0.645646, 0.149370],\n        ...                    'C':[0.173891, 0.577595, 0.491027]},\n        ...                    columns=['A', 'B', 'C'],\n        ...                    index=['first', 'second', 'third'])\n        >>> df\n                       A         B         C\n        first   0.028208  0.992815  0.173891\n        second  0.038683  0.645646  0.577595\n        third   0.877076  0.149370  0.491027\n\n        >>> df.round(2)\n                   A     B     C\n        first   0.03  0.99  0.17\n        second  0.04  0.65  0.58\n        third   0.88  0.15  0.49\n\n        >>> df.round({'A': 1, 'C': 2})\n                  A         B     C\n        first   0.0  0.992815  0.17\n        second  0.0  0.645646  0.58\n        third   0.9  0.149370  0.49\n\n        >>> decimals = ps.Series([1, 0, 2], index=['A', 'B', 'C'])\n        >>> df.round(decimals)\n                  A    B     C\n        first   0.0  1.0  0.17\n        second  0.0  1.0  0.58\n        third   0.9  0.0  0.49\n        "
    if isinstance(decimals, ps.Series):
        decimals_dict = {(k if isinstance(k, tuple) else (k,)): v for (k, v) in decimals._to_internal_pandas().items()}
    elif isinstance(decimals, dict):
        decimals_dict = {(k if is_name_like_tuple(k) else (k,)): v for (k, v) in decimals.items()}
    elif isinstance(decimals, int):
        decimals_dict = {k: decimals for k in self._internal.column_labels}
    else:
        raise TypeError('decimals must be an integer, a dict-like or a Series')

    def op(psser: ps.Series) -> Union[(ps.Series, Column)]:
        label = psser._column_label
        if (label in decimals_dict):
            return F.round(psser.spark.column, decimals_dict[label])
        else:
            return psser
    return self._apply_series_op(op)
Round a DataFrame to a variable number of decimal places.

Parameters
----------
decimals : int, dict, Series
    Number of decimal places to round each column to. If an int is
    given, round each column to the same number of places.
    Otherwise dict and Series round to variable numbers of places.
    Column names should be in the keys if `decimals` is a
    dict-like, or in the index if `decimals` is a Series. Any
    columns not included in `decimals` will be left as is. Elements
    of `decimals` which are not columns of the input will be
    ignored.

    .. note:: If `decimals` is a Series, it is expected to be small,
        as all the data is loaded into the driver's memory.

Returns
-------
DataFrame

See Also
--------
Series.round

Examples
--------
>>> df = ps.DataFrame({'A':[0.028208, 0.038683, 0.877076],
...                    'B':[0.992815, 0.645646, 0.149370],
...                    'C':[0.173891, 0.577595, 0.491027]},
...                    columns=['A', 'B', 'C'],
...                    index=['first', 'second', 'third'])
>>> df
               A         B         C
first   0.028208  0.992815  0.173891
second  0.038683  0.645646  0.577595
third   0.877076  0.149370  0.491027

>>> df.round(2)
           A     B     C
first   0.03  0.99  0.17
second  0.04  0.65  0.58
third   0.88  0.15  0.49

>>> df.round({'A': 1, 'C': 2})
          A         B     C
first   0.0  0.992815  0.17
second  0.0  0.645646  0.58
third   0.9  0.149370  0.49

>>> decimals = ps.Series([1, 0, 2], index=['A', 'B', 'C'])
>>> df.round(decimals)
          A    B     C
first   0.0  1.0  0.17
second  0.0  1.0  0.58
third   0.9  0.0  0.49
def round(self, decimals: Union[(int, Dict[(Name, int)], 'Series')]=0) -> 'DataFrame':
    "\n        Round a DataFrame to a variable number of decimal places.\n\n        Parameters\n        ----------\n        decimals : int, dict, Series\n            Number of decimal places to round each column to. If an int is\n            given, round each column to the same number of places.\n            Otherwise dict and Series round to variable numbers of places.\n            Column names should be in the keys if `decimals` is a\n            dict-like, or in the index if `decimals` is a Series. Any\n            columns not included in `decimals` will be left as is. Elements\n            of `decimals` which are not columns of the input will be\n            ignored.\n\n            .. note:: If `decimals` is a Series, it is expected to be small,\n                as all the data is loaded into the driver's memory.\n\n        Returns\n        -------\n        DataFrame\n\n        See Also\n        --------\n        Series.round\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({'A':[0.028208, 0.038683, 0.877076],\n        ...                    'B':[0.992815, 0.645646, 0.149370],\n        ...                    'C':[0.173891, 0.577595, 0.491027]},\n        ...                    columns=['A', 'B', 'C'],\n        ...                    index=['first', 'second', 'third'])\n        >>> df\n                       A         B         C\n        first   0.028208  0.992815  0.173891\n        second  0.038683  0.645646  0.577595\n        third   0.877076  0.149370  0.491027\n\n        >>> df.round(2)\n                   A     B     C\n        first   0.03  0.99  0.17\n        second  0.04  0.65  0.58\n        third   0.88  0.15  0.49\n\n        >>> df.round({'A': 1, 'C': 2})\n                  A         B     C\n        first   0.0  0.992815  0.17\n        second  0.0  0.645646  0.58\n        third   0.9  0.149370  0.49\n\n        >>> decimals = ps.Series([1, 0, 2], index=['A', 'B', 'C'])\n        >>> df.round(decimals)\n                  A    B     C\n        first   0.0  1.0  0.17\n        second  0.0  1.0  0.58\n        third   0.9  0.0  0.49\n        "
    if isinstance(decimals, ps.Series):
        decimals_dict = {(k if isinstance(k, tuple) else (k,)): v for (k, v) in decimals._to_internal_pandas().items()}
    elif isinstance(decimals, dict):
        decimals_dict = {(k if is_name_like_tuple(k) else (k,)): v for (k, v) in decimals.items()}
    elif isinstance(decimals, int):
        decimals_dict = {k: decimals for k in self._internal.column_labels}
    else:
        raise TypeError('decimals must be an integer, a dict-like or a Series')

    def op(psser: ps.Series) -> Union[(ps.Series, Column)]:
        label = psser._column_label
        if (label in decimals_dict):
            return F.round(psser.spark.column, decimals_dict[label])
        else:
            return psser
    return self._apply_series_op(op)