@@ -2069,25 +2069,26 @@ def _repr_latex_(self):
2069
2069
>>> df1 = pd.DataFrame([['a', 'b'], ['c', 'd']],
2070
2070
... index=['row 1', 'row 2'],
2071
2071
... columns=['col 1', 'col 2'])
2072
- >>> df1.to_excel("output.xlsx")
2072
+ >>> df1.to_excel("output.xlsx") # doctest: +SKIP
2073
2073
2074
2074
To specify the sheet name:
2075
2075
2076
- >>> df1.to_excel("output.xlsx", sheet_name='Sheet_name_1')
2076
+ >>> df1.to_excel("output.xlsx",
2077
+ ... sheet_name='Sheet_name_1') # doctest: +SKIP
2077
2078
2078
2079
If you wish to write to more than one sheet in the workbook, it is
2079
2080
necessary to specify an ExcelWriter object:
2080
2081
2081
2082
>>> df2 = df1.copy()
2082
- >>> with pd.ExcelWriter('output.xlsx') as writer:
2083
+ >>> with pd.ExcelWriter('output.xlsx') as writer: # doctest: +SKIP
2083
2084
... df1.to_excel(writer, sheet_name='Sheet_name_1')
2084
2085
... df2.to_excel(writer, sheet_name='Sheet_name_2')
2085
2086
2086
2087
To set the library that is used to write the Excel file,
2087
2088
you can pass the `engine` keyword (the default engine is
2088
2089
automatically chosen depending on the file extension):
2089
2090
2090
- >>> df1.to_excel('output1.xlsx', engine='xlsxwriter')
2091
+ >>> df1.to_excel('output1.xlsx', engine='xlsxwriter') # doctest: +SKIP
2091
2092
"""
2092
2093
2093
2094
def to_json (self , path_or_buf = None , orient = None , date_format = None ,
0 commit comments