def to_markdown(self, buf: Optional[Union[(IO[str], str)]]=None, mode: Optional[str]=None) -> str:
    '\n        Print Series or DataFrame in Markdown-friendly format.\n\n        .. note:: This method should only be used if the resulting pandas object is expected\n                  to be small, as all the data is loaded into the driver\'s memory.\n\n        Parameters\n        ----------\n        buf : writable buffer, defaults to sys.stdout\n            Where to send the output. By default, the output is printed to\n            sys.stdout. Pass a writable buffer if you need to further process\n            the output.\n        mode : str, optional\n            Mode in which file is opened.\n        **kwargs\n            These parameters will be passed to `tabulate`.\n\n        Returns\n        -------\n        str\n            Series or DataFrame in Markdown-friendly format.\n\n        Notes\n        -----\n        Requires the `tabulate <https://pypi.org/project/tabulate>`_ package.\n\n        Examples\n        --------\n        >>> psser = ps.Series(["elk", "pig", "dog", "quetzal"], name="animal")\n        >>> print(psser.to_markdown())  # doctest: +SKIP\n        |    | animal   |\n        |---:|:---------|\n        |  0 | elk      |\n        |  1 | pig      |\n        |  2 | dog      |\n        |  3 | quetzal  |\n\n        >>> psdf = ps.DataFrame(\n        ...     data={"animal_1": ["elk", "pig"], "animal_2": ["dog", "quetzal"]}\n        ... )\n        >>> print(psdf.to_markdown())  # doctest: +SKIP\n        |    | animal_1   | animal_2   |\n        |---:|:-----------|:-----------|\n        |  0 | elk        | dog        |\n        |  1 | pig        | quetzal    |\n        '
    if (LooseVersion(pd.__version__) < LooseVersion('1.0.0')):
        raise NotImplementedError('`to_markdown()` only supported in pandas-on-Spark with pandas >= 1.0.0')
    args = locals()
    psser_or_psdf = self
    internal_pandas = psser_or_psdf._to_internal_pandas()
    return validate_arguments_and_invoke_function(internal_pandas, self.to_markdown, type(internal_pandas).to_markdown, args)
Print Series or DataFrame in Markdown-friendly format.

.. note:: This method should only be used if the resulting pandas object is expected
          to be small, as all the data is loaded into the driver's memory.

Parameters
----------
buf : writable buffer, defaults to sys.stdout
    Where to send the output. By default, the output is printed to
    sys.stdout. Pass a writable buffer if you need to further process
    the output.
mode : str, optional
    Mode in which file is opened.
**kwargs
    These parameters will be passed to `tabulate`.

Returns
-------
str
    Series or DataFrame in Markdown-friendly format.

Notes
-----
Requires the `tabulate <https://pypi.org/project/tabulate>`_ package.

Examples
--------
>>> psser = ps.Series(["elk", "pig", "dog", "quetzal"], name="animal")
>>> print(psser.to_markdown())  # doctest: +SKIP
|    | animal   |
|---:|:---------|
|  0 | elk      |
|  1 | pig      |
|  2 | dog      |
|  3 | quetzal  |

>>> psdf = ps.DataFrame(
...     data={"animal_1": ["elk", "pig"], "animal_2": ["dog", "quetzal"]}
... )
>>> print(psdf.to_markdown())  # doctest: +SKIP
|    | animal_1   | animal_2   |
|---:|:-----------|:-----------|
|  0 | elk        | dog        |
|  1 | pig        | quetzal    |
def to_markdown(self, buf: Optional[Union[(IO[str], str)]]=None, mode: Optional[str]=None) -> str:
    '\n        Print Series or DataFrame in Markdown-friendly format.\n\n        .. note:: This method should only be used if the resulting pandas object is expected\n                  to be small, as all the data is loaded into the driver\'s memory.\n\n        Parameters\n        ----------\n        buf : writable buffer, defaults to sys.stdout\n            Where to send the output. By default, the output is printed to\n            sys.stdout. Pass a writable buffer if you need to further process\n            the output.\n        mode : str, optional\n            Mode in which file is opened.\n        **kwargs\n            These parameters will be passed to `tabulate`.\n\n        Returns\n        -------\n        str\n            Series or DataFrame in Markdown-friendly format.\n\n        Notes\n        -----\n        Requires the `tabulate <https://pypi.org/project/tabulate>`_ package.\n\n        Examples\n        --------\n        >>> psser = ps.Series(["elk", "pig", "dog", "quetzal"], name="animal")\n        >>> print(psser.to_markdown())  # doctest: +SKIP\n        |    | animal   |\n        |---:|:---------|\n        |  0 | elk      |\n        |  1 | pig      |\n        |  2 | dog      |\n        |  3 | quetzal  |\n\n        >>> psdf = ps.DataFrame(\n        ...     data={"animal_1": ["elk", "pig"], "animal_2": ["dog", "quetzal"]}\n        ... )\n        >>> print(psdf.to_markdown())  # doctest: +SKIP\n        |    | animal_1   | animal_2   |\n        |---:|:-----------|:-----------|\n        |  0 | elk        | dog        |\n        |  1 | pig        | quetzal    |\n        '
    if (LooseVersion(pd.__version__) < LooseVersion('1.0.0')):
        raise NotImplementedError('`to_markdown()` only supported in pandas-on-Spark with pandas >= 1.0.0')
    args = locals()
    psser_or_psdf = self
    internal_pandas = psser_or_psdf._to_internal_pandas()
    return validate_arguments_and_invoke_function(internal_pandas, self.to_markdown, type(internal_pandas).to_markdown, args)