From 05503fa5f7413a25873938d5d3620d7585c32950 Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Sat, 13 Apr 2019 23:16:05 -0500 Subject: [PATCH 01/15] BUG resolving issue 26051 and adding a unit test. --- pandas/core/generic.py | 8 ++++++++ pandas/tests/generic/test_generic.py | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 885c499c58dfa..dcbcb258af25f 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2146,8 +2146,16 @@ def to_excel(self, excel_writer, sheet_name="Sheet1", na_rep="", index_label=None, startrow=0, startcol=0, engine=None, merge_cells=True, encoding=None, inf_rep="inf", verbose=True, freeze_panes=None): + df = self if isinstance(self, ABCDataFrame) else self.to_frame() + max_rows = 2**20 + max_cols = 2**14 + num_rows, num_cols = df.shape + if num_rows > max_rows or num_cols > max_cols: + raise ValueError(f"This sheet is too large! Your sheet size is: {(num_rows, num_cols)}. " + f"Max sheet size is: {(max_rows, max_cols)}.") + from pandas.io.formats.excel import ExcelFormatter formatter = ExcelFormatter(df, na_rep=na_rep, cols=columns, header=header, diff --git a/pandas/tests/generic/test_generic.py b/pandas/tests/generic/test_generic.py index d3b63e428b374..462a7fb90b22e 100644 --- a/pandas/tests/generic/test_generic.py +++ b/pandas/tests/generic/test_generic.py @@ -569,6 +569,7 @@ def test_copy_and_deepcopy(self): (-1, "bfill", None, [0, 0, -.5, -.5, -.6, np.nan, np.nan, np.nan]), (-1, "bfill", 1, [np.nan, 0, -.5, -.5, -.6, np.nan, np.nan, np.nan]) ]) + def test_pct_change(self, periods, fill_method, limit, exp): vals = [np.nan, np.nan, 1, 2, 4, 10, np.nan, np.nan] obj = self._typ(vals) @@ -583,6 +584,16 @@ def test_pct_change(self, periods, fill_method, limit, exp): class TestNDFrame(object): # tests that don't fit elsewhere + def test_to_excel_size(self): + BREAKING_SHAPE = (2**20 + 1, 2**14 + 1) + arr = np.zeros(shape=BREAKING_SHAPE) + df = pd.DataFrame(arr) + filepath = 'test.xlsx' + + with pytest.raises(ValueError) as error_info: + df.to_excel(filepath) + + def test_sample(sel): # Fixes issue: 2419 # additional specific object based tests From c5f9db90d99fb845981d3691269dc18d863e06ea Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Sat, 13 Apr 2019 23:36:14 -0500 Subject: [PATCH 02/15] CLN. Cleaning up PEP-8 errors. --- pandas/core/generic.py | 5 +++-- pandas/tests/generic/test_generic.py | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index dcbcb258af25f..44c59aaa7a37d 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2153,8 +2153,9 @@ def to_excel(self, excel_writer, sheet_name="Sheet1", na_rep="", max_cols = 2**14 num_rows, num_cols = df.shape if num_rows > max_rows or num_cols > max_cols: - raise ValueError(f"This sheet is too large! Your sheet size is: {(num_rows, num_cols)}. " - f"Max sheet size is: {(max_rows, max_cols)}.") + raise ValueError(f"This sheet is too large! Your sheet size is: " + f"{(num_rows, num_cols)}. " + f"Max sheet size is: {(max_rows, max_cols)}.") from pandas.io.formats.excel import ExcelFormatter formatter = ExcelFormatter(df, na_rep=na_rep, cols=columns, diff --git a/pandas/tests/generic/test_generic.py b/pandas/tests/generic/test_generic.py index 462a7fb90b22e..9cb9ee26c1ae2 100644 --- a/pandas/tests/generic/test_generic.py +++ b/pandas/tests/generic/test_generic.py @@ -569,7 +569,6 @@ def test_copy_and_deepcopy(self): (-1, "bfill", None, [0, 0, -.5, -.5, -.6, np.nan, np.nan, np.nan]), (-1, "bfill", 1, [np.nan, 0, -.5, -.5, -.6, np.nan, np.nan, np.nan]) ]) - def test_pct_change(self, periods, fill_method, limit, exp): vals = [np.nan, np.nan, 1, 2, 4, 10, np.nan, np.nan] obj = self._typ(vals) @@ -590,10 +589,9 @@ def test_to_excel_size(self): df = pd.DataFrame(arr) filepath = 'test.xlsx' - with pytest.raises(ValueError) as error_info: + with pytest.raises(ValueError): df.to_excel(filepath) - def test_sample(sel): # Fixes issue: 2419 # additional specific object based tests From f6abceb4754c22705658b314e04bfc8f9f55d4f3 Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Thu, 25 Apr 2019 22:42:07 -0400 Subject: [PATCH 03/15] Stylistic changes. --- pandas/core/generic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 44c59aaa7a37d..ed079226cca9b 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2149,13 +2149,13 @@ def to_excel(self, excel_writer, sheet_name="Sheet1", na_rep="", df = self if isinstance(self, ABCDataFrame) else self.to_frame() - max_rows = 2**20 - max_cols = 2**14 + excel_max_rows = 2**20 + excel_max_cols = 2**14 num_rows, num_cols = df.shape - if num_rows > max_rows or num_cols > max_cols: + if num_rows > excel_max_rows or num_cols > excel_max_cols: raise ValueError(f"This sheet is too large! Your sheet size is: " f"{(num_rows, num_cols)}. " - f"Max sheet size is: {(max_rows, max_cols)}.") + f"Max sheet size is: {(excel_max_rows, excel_max_cols)}.") from pandas.io.formats.excel import ExcelFormatter formatter = ExcelFormatter(df, na_rep=na_rep, cols=columns, From 65fe420c265d61eea20f15fa6b6cfbc059fb2f14 Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Thu, 25 Apr 2019 23:03:06 -0400 Subject: [PATCH 04/15] Remove f strings due to python3.5 incompatibility. --- pandas/core/generic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index ed079226cca9b..3030b29dab258 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2153,9 +2153,9 @@ def to_excel(self, excel_writer, sheet_name="Sheet1", na_rep="", excel_max_cols = 2**14 num_rows, num_cols = df.shape if num_rows > excel_max_rows or num_cols > excel_max_cols: - raise ValueError(f"This sheet is too large! Your sheet size is: " - f"{(num_rows, num_cols)}. " - f"Max sheet size is: {(excel_max_rows, excel_max_cols)}.") + raise ValueError("This sheet is too large! Your sheet size is: " + + "{}, {} ".format(num_rows, num_cols) + + "Max sheet size is: {}, {}".format(excel_max_rows, excel_max_cols)) from pandas.io.formats.excel import ExcelFormatter formatter = ExcelFormatter(df, na_rep=na_rep, cols=columns, From e0a9b7ef85faf69b0a4e6c2f1223e20d06c1d8f1 Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Tue, 30 Apr 2019 18:40:28 -0400 Subject: [PATCH 05/15] Moved code to excel.py and test_excel.py. Pytests failing due to xlrd deprecation error. --- pandas/core/generic.py | 8 -------- pandas/io/formats/excel.py | 9 +++++++++ pandas/tests/generic/test_generic.py | 9 --------- pandas/tests/io/test_excel.py | 11 +++++++++++ 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 3030b29dab258..56fc8fc49110b 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2149,14 +2149,6 @@ def to_excel(self, excel_writer, sheet_name="Sheet1", na_rep="", df = self if isinstance(self, ABCDataFrame) else self.to_frame() - excel_max_rows = 2**20 - excel_max_cols = 2**14 - num_rows, num_cols = df.shape - if num_rows > excel_max_rows or num_cols > excel_max_cols: - raise ValueError("This sheet is too large! Your sheet size is: " + - "{}, {} ".format(num_rows, num_cols) + - "Max sheet size is: {}, {}".format(excel_max_rows, excel_max_cols)) - from pandas.io.formats.excel import ExcelFormatter formatter = ExcelFormatter(df, na_rep=na_rep, cols=columns, header=header, diff --git a/pandas/io/formats/excel.py b/pandas/io/formats/excel.py index aa88f6c520c0d..cc165d2955dd0 100644 --- a/pandas/io/formats/excel.py +++ b/pandas/io/formats/excel.py @@ -341,6 +341,9 @@ class ExcelFormatter(object): This is only called for body cells. """ + max_rows = 2**20 + max_cols = 2**14 + def __init__(self, df, na_rep='', float_format=None, cols=None, header=True, index=True, index_label=None, merge_cells=False, inf_rep='inf', style_converter=None): @@ -647,6 +650,12 @@ def write(self, writer, sheet_name='Sheet1', startrow=0, """ from pandas.io.excel import ExcelWriter from pandas.io.common import _stringify_path + + num_rows, num_cols = df.shape + if num_rows > self.max_rows or num_cols > self.max_cols: + raise ValueError("This sheet is too large! Your sheet size is: " + + "{}, {} ".format(num_rows, num_cols) + + "Max sheet size is: {}, {}".format(excel_max_rows, excel_max_cols)) if isinstance(writer, ExcelWriter): need_save = False diff --git a/pandas/tests/generic/test_generic.py b/pandas/tests/generic/test_generic.py index 9cb9ee26c1ae2..d3b63e428b374 100644 --- a/pandas/tests/generic/test_generic.py +++ b/pandas/tests/generic/test_generic.py @@ -583,15 +583,6 @@ def test_pct_change(self, periods, fill_method, limit, exp): class TestNDFrame(object): # tests that don't fit elsewhere - def test_to_excel_size(self): - BREAKING_SHAPE = (2**20 + 1, 2**14 + 1) - arr = np.zeros(shape=BREAKING_SHAPE) - df = pd.DataFrame(arr) - filepath = 'test.xlsx' - - with pytest.raises(ValueError): - df.to_excel(filepath) - def test_sample(sel): # Fixes issue: 2419 # additional specific object based tests diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index 1377888a58d07..553623f04278f 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -1212,6 +1212,17 @@ class and any subclasses, on account of the `autouse=True` class TestExcelWriter(_WriterBase): # Base class for test cases to run with different Excel writers. + # def test_excel_sheet_size(self): + # assert False + + # BREAKING_SHAPE = (2**20 + 1, 2**14 + 1) + # arr = np.zeros(shape=BREAKING_SHAPE) + # df = pd.DataFrame(arr) + # filepath = 'test.xlsx' + + # with pytest.raises(ValueError): + # df.to_excel(filepath) + def test_excel_sheet_by_name_raise(self, *_): import xlrd From 10ca447f8472064f2f23950761f3c574700a5f0a Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Thu, 2 May 2019 14:41:39 -0400 Subject: [PATCH 06/15] df -> self.df. new error: Pending Deprecation Warning --- pandas/io/formats/excel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/formats/excel.py b/pandas/io/formats/excel.py index cc165d2955dd0..6212b97660fb8 100644 --- a/pandas/io/formats/excel.py +++ b/pandas/io/formats/excel.py @@ -651,7 +651,7 @@ def write(self, writer, sheet_name='Sheet1', startrow=0, from pandas.io.excel import ExcelWriter from pandas.io.common import _stringify_path - num_rows, num_cols = df.shape + num_rows, num_cols = self.df.shape if num_rows > self.max_rows or num_cols > self.max_cols: raise ValueError("This sheet is too large! Your sheet size is: " + "{}, {} ".format(num_rows, num_cols) + From ed5d3b357ef532f2e2cd15e156c894145c407ef8 Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Mon, 13 May 2019 14:19:41 -0400 Subject: [PATCH 07/15] Addressed comments + ensured lint success. --- pandas/core/generic.py | 1 - pandas/tests/io/test_excel.py | 18 ++++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 56fc8fc49110b..885c499c58dfa 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2146,7 +2146,6 @@ def to_excel(self, excel_writer, sheet_name="Sheet1", na_rep="", index_label=None, startrow=0, startcol=0, engine=None, merge_cells=True, encoding=None, inf_rep="inf", verbose=True, freeze_panes=None): - df = self if isinstance(self, ABCDataFrame) else self.to_frame() from pandas.io.formats.excel import ExcelFormatter diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index 553623f04278f..7deaf449b36bb 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -1212,16 +1212,14 @@ class and any subclasses, on account of the `autouse=True` class TestExcelWriter(_WriterBase): # Base class for test cases to run with different Excel writers. - # def test_excel_sheet_size(self): - # assert False - - # BREAKING_SHAPE = (2**20 + 1, 2**14 + 1) - # arr = np.zeros(shape=BREAKING_SHAPE) - # df = pd.DataFrame(arr) - # filepath = 'test.xlsx' - - # with pytest.raises(ValueError): - # df.to_excel(filepath) + def test_excel_sheet_size(self): + breaking_shape = (2**20 + 1, 2**14 + 1) + arr = np.zeros(shape=breaking_shape) + df = pd.DataFrame(arr) + + msg = "sheet is too large" + with pytest.raises(ValueError, match=msg): + df.to_excel(self.path) def test_excel_sheet_by_name_raise(self, *_): import xlrd From dedf5dbaa046d429687fa421f51c15fce66fa61b Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Tue, 14 May 2019 14:31:59 -0400 Subject: [PATCH 08/15] re-structure test to decrease memory useage. --- pandas/tests/io/test_excel.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index 7deaf449b36bb..86ad8172a4878 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -1212,15 +1212,22 @@ class and any subclasses, on account of the `autouse=True` class TestExcelWriter(_WriterBase): # Base class for test cases to run with different Excel writers. - def test_excel_sheet_size(self): - breaking_shape = (2**20 + 1, 2**14 + 1) - arr = np.zeros(shape=breaking_shape) - df = pd.DataFrame(arr) + def test_excel_sheet_size(self): + breaking_row_count = 2**20 + 1 + breaking_col_count = 2**14 + 1 + #purposely using two arrays to prevent memory issues while testing + row_arr = np.zeros(shape=(breaking_row_count, 1)) + col_arr = np.zeros(shape=(1, breaking_col_count)) + row_df = pd.DataFrame(row_arr) + col_df = pd.DataFrame(col_arr) msg = "sheet is too large" with pytest.raises(ValueError, match=msg): - df.to_excel(self.path) + row_df.to_excel(self.path) + with pytest.raises(ValueError, match=msg): + col_df.to_excel(self.path) + def test_excel_sheet_by_name_raise(self, *_): import xlrd From fde1703754be14531d335a91c98fe267c6af192f Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Tue, 14 May 2019 15:06:41 -0400 Subject: [PATCH 09/15] fix misnaming --- pandas/io/formats/excel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/formats/excel.py b/pandas/io/formats/excel.py index 6212b97660fb8..d467abcabfcf9 100644 --- a/pandas/io/formats/excel.py +++ b/pandas/io/formats/excel.py @@ -655,7 +655,7 @@ def write(self, writer, sheet_name='Sheet1', startrow=0, if num_rows > self.max_rows or num_cols > self.max_cols: raise ValueError("This sheet is too large! Your sheet size is: " + "{}, {} ".format(num_rows, num_cols) + - "Max sheet size is: {}, {}".format(excel_max_rows, excel_max_cols)) + "Max sheet size is: {}, {}".format(self.max_rows, self.max_cols)) if isinstance(writer, ExcelWriter): need_save = False From e035a2df24105a231202adf373ff4dddcd195fb1 Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Tue, 14 May 2019 19:02:31 -0400 Subject: [PATCH 10/15] stylistic fixes --- pandas/io/formats/excel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/io/formats/excel.py b/pandas/io/formats/excel.py index d467abcabfcf9..3482f0d8ee573 100644 --- a/pandas/io/formats/excel.py +++ b/pandas/io/formats/excel.py @@ -655,7 +655,8 @@ def write(self, writer, sheet_name='Sheet1', startrow=0, if num_rows > self.max_rows or num_cols > self.max_cols: raise ValueError("This sheet is too large! Your sheet size is: " + "{}, {} ".format(num_rows, num_cols) + - "Max sheet size is: {}, {}".format(self.max_rows, self.max_cols)) + "Max sheet size is: {}, {}". + format(self.max_rows, self.max_cols)) if isinstance(writer, ExcelWriter): need_save = False From 66dbb5115ef4dc02ac20f61dbeccb546a9cc781a Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Sat, 18 May 2019 23:16:22 -0400 Subject: [PATCH 11/15] Formatting updates to pass lint tests --- pandas/io/formats/excel.py | 4 ++-- pandas/tests/io/test_excel.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pandas/io/formats/excel.py b/pandas/io/formats/excel.py index 3482f0d8ee573..abd5ebbdf69b0 100644 --- a/pandas/io/formats/excel.py +++ b/pandas/io/formats/excel.py @@ -343,7 +343,7 @@ class ExcelFormatter(object): max_rows = 2**20 max_cols = 2**14 - + def __init__(self, df, na_rep='', float_format=None, cols=None, header=True, index=True, index_label=None, merge_cells=False, inf_rep='inf', style_converter=None): @@ -650,7 +650,7 @@ def write(self, writer, sheet_name='Sheet1', startrow=0, """ from pandas.io.excel import ExcelWriter from pandas.io.common import _stringify_path - + num_rows, num_cols = self.df.shape if num_rows > self.max_rows or num_cols > self.max_cols: raise ValueError("This sheet is too large! Your sheet size is: " + diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index 86ad8172a4878..5eac43805c775 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -1212,7 +1212,9 @@ class and any subclasses, on account of the `autouse=True` class TestExcelWriter(_WriterBase): # Base class for test cases to run with different Excel writers. - def test_excel_sheet_size(self): + def test_excel_sheet_size(self): + + # GH 26080 breaking_row_count = 2**20 + 1 breaking_col_count = 2**14 + 1 #purposely using two arrays to prevent memory issues while testing @@ -1227,7 +1229,7 @@ def test_excel_sheet_size(self): with pytest.raises(ValueError, match=msg): col_df.to_excel(self.path) - + def test_excel_sheet_by_name_raise(self, *_): import xlrd From f152e2ee1105b4a75cb0f27d5a89411ad6aad4f0 Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Thu, 23 May 2019 13:48:16 -0400 Subject: [PATCH 12/15] Fix lint error and update whatsnew. --- doc/source/whatsnew/v0.25.0.rst | 1 + pandas/tests/io/test_excel.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 7b87f6a7f8d3c..4c07c40a74b0c 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -36,6 +36,7 @@ Other Enhancements - :class:`RangeIndex` has gained :attr:`~RangeIndex.start`, :attr:`~RangeIndex.stop`, and :attr:`~RangeIndex.step` attributes (:issue:`25710`) - :class:`datetime.timezone` objects are now supported as arguments to timezone methods and constructors (:issue:`25065`) - :meth:`DataFrame.query` and :meth:`DataFrame.eval` now supports quoting column names with backticks to refer to names with spaces (:issue:`6508`) +- :meth:'DataFrame.to_excel' now performs input-checking. .. _whatsnew_0250.api_breaking: diff --git a/pandas/tests/io/test_excel.py b/pandas/tests/io/test_excel.py index 5eac43805c775..44647b8a8d0f3 100644 --- a/pandas/tests/io/test_excel.py +++ b/pandas/tests/io/test_excel.py @@ -1217,7 +1217,7 @@ def test_excel_sheet_size(self): # GH 26080 breaking_row_count = 2**20 + 1 breaking_col_count = 2**14 + 1 - #purposely using two arrays to prevent memory issues while testing + # purposely using two arrays to prevent memory issues while testing row_arr = np.zeros(shape=(breaking_row_count, 1)) col_arr = np.zeros(shape=(1, breaking_col_count)) row_df = pd.DataFrame(row_arr) From 4910e804613daf52259c21f350b5da476577bfc8 Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Fri, 24 May 2019 17:16:46 -0400 Subject: [PATCH 13/15] Rephrase whatsnew --- doc/source/whatsnew/v0.25.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 4c07c40a74b0c..f3ff419a00035 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -36,7 +36,7 @@ Other Enhancements - :class:`RangeIndex` has gained :attr:`~RangeIndex.start`, :attr:`~RangeIndex.stop`, and :attr:`~RangeIndex.step` attributes (:issue:`25710`) - :class:`datetime.timezone` objects are now supported as arguments to timezone methods and constructors (:issue:`25065`) - :meth:`DataFrame.query` and :meth:`DataFrame.eval` now supports quoting column names with backticks to refer to names with spaces (:issue:`6508`) -- :meth:'DataFrame.to_excel' now performs input-checking. +- :meth:'DataFrame.to_excel' now raises a ``ValueError`` when the caller's dimensions exceed the limitations of Excel (:issue:`26051`) .. _whatsnew_0250.api_breaking: From eff16185f412976119a6b78a3817945aaa289df0 Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Mon, 27 May 2019 20:06:44 -0400 Subject: [PATCH 14/15] Formatting fix --- doc/source/whatsnew/v0.25.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index f3ff419a00035..51379d3647506 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -36,7 +36,7 @@ Other Enhancements - :class:`RangeIndex` has gained :attr:`~RangeIndex.start`, :attr:`~RangeIndex.stop`, and :attr:`~RangeIndex.step` attributes (:issue:`25710`) - :class:`datetime.timezone` objects are now supported as arguments to timezone methods and constructors (:issue:`25065`) - :meth:`DataFrame.query` and :meth:`DataFrame.eval` now supports quoting column names with backticks to refer to names with spaces (:issue:`6508`) -- :meth:'DataFrame.to_excel' now raises a ``ValueError`` when the caller's dimensions exceed the limitations of Excel (:issue:`26051`) +- :meth:`DataFrame.to_excel` now raises a ``ValueError`` when the caller's dimensions exceed the limitations of Excel (:issue:`26051`) .. _whatsnew_0250.api_breaking: From 66f4602f7ffaaf35a5430882937ba9030c6606fe Mon Sep 17 00:00:00 2001 From: Alex Nordin Date: Sat, 1 Jun 2019 08:43:27 -0400 Subject: [PATCH 15/15] whatsnew update --- doc/source/whatsnew/v0.25.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 5b0f52ab13c83..1a0df4789f4c7 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -39,7 +39,6 @@ Other Enhancements - :class:`RangeIndex` has gained :attr:`~RangeIndex.start`, :attr:`~RangeIndex.stop`, and :attr:`~RangeIndex.step` attributes (:issue:`25710`) - :class:`datetime.timezone` objects are now supported as arguments to timezone methods and constructors (:issue:`25065`) - :meth:`DataFrame.query` and :meth:`DataFrame.eval` now supports quoting column names with backticks to refer to names with spaces (:issue:`6508`) -- :meth:`DataFrame.to_excel` now raises a ``ValueError`` when the caller's dimensions exceed the limitations of Excel (:issue:`26051`) - :func:`merge_asof` now gives a more clear error message when merge keys are categoricals that are not equal (:issue:`26136`) - :meth:`pandas.core.window.Rolling` supports exponential (or Poisson) window type (:issue:`21303`) - @@ -467,6 +466,7 @@ I/O - Fixed memory leak in :meth:`DataFrame.to_json` when dealing with numeric data (:issue:`24889`) - Bug in :func:`read_json` where date strings with ``Z`` were not converted to a UTC timezone (:issue:`26168`) - Added ``cache_dates=True`` parameter to :meth:`read_csv`, which allows to cache unique dates when they are parsed (:issue:`25990`) +- :meth:`DataFrame.to_excel` now raises a ``ValueError`` when the caller's dimensions exceed the limitations of Excel (:issue:`26051`) Plotting ^^^^^^^^