diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 5341b87c39676..98bb3914fa522 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3100,9 +3100,18 @@ def to_html( .. versionadded:: 1.0 %(returns)s + See Also -------- to_string : Convert DataFrame to a string. + + Examples + -------- + Create, write to and save a workbook: + >>> df1 = pd.DataFrame([['a', 'b'], ['c', 'd']], + ... index=['row 1', 'row 2'], + ... columns=['col 1', 'col 2']) + >>> df1.to_html("output.html") # doctest: +SKIP """ if justify is not None and justify not in fmt._VALID_JUSTIFY_PARAMETERS: raise ValueError("Invalid value for justify parameter")