From bc1c025bfe5fe25606776aaf440e8c7989be36f5 Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Sat, 7 Dec 2019 13:59:43 -0800 Subject: [PATCH] CLN: dont alter state when returning data/values --- pandas/io/pytables.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index a95d7f39ab82c..1089dec059dbf 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -2010,9 +2010,8 @@ def convert( self.values = _set_tz(self.values, self.tz) def take_data(self): - """ return the values & release the memory """ - self.values, values = None, self.values - return values + """ return the values""" + return self.values @property def attrs(self): @@ -2288,9 +2287,8 @@ def set_data(self, data: Union[np.ndarray, ABCExtensionArray]): self.set_kind() def take_data(self): - """ return the data & release the memory """ - self.data, data = None, self.data - return data + """ return the data """ + return self.data def set_kind(self): # set my kind if we can