File tree 2 files changed +3
-27
lines changed
2 files changed +3
-27
lines changed Original file line number Diff line number Diff line change @@ -1048,7 +1048,7 @@ def is_monotonic_decreasing(self):
1048
1048
1049
1049
def memory_usage (self , deep = False ):
1050
1050
"""
1051
- Memory usage of my values
1051
+ Memory usage of the values
1052
1052
1053
1053
Parameters
1054
1054
----------
Original file line number Diff line number Diff line change 8
8
import warnings
9
9
10
10
import pandas as pd
11
- from pandas .core .base import PandasObject
11
+ from pandas .core .base import PandasObject , IndexOpsMixin
12
12
13
13
from pandas import compat
14
14
from pandas .compat import range , PYPY
@@ -239,33 +239,9 @@ def kind(self):
239
239
elif isinstance (self .sp_index , IntIndex ):
240
240
return 'integer'
241
241
242
+ @Appender (IndexOpsMixin .memory_usage .__doc__ )
242
243
def memory_usage (self , deep = False ):
243
- """Memory usage of SparseArray
244
-
245
- Parameters
246
- ----------
247
- deep : bool
248
- Introspect the data deeply, interrogate
249
- `object` dtypes for system-level memory consumption
250
-
251
- Returns
252
- -------
253
- scalar bytes of memory consumed
254
-
255
- Notes
256
- -----
257
- Memory usage does not include memory of empty cells filled by
258
- fill_value. And it does not include memory consumed by
259
- elements that are not components of the array if deep=False
260
-
261
- See also
262
- --------
263
- Series.memory_usage
264
- """
265
-
266
244
values = self .sp_values
267
- if hasattr (values , 'memory_usage' ):
268
- return values .memory_usage (deep = deep )
269
245
270
246
v = values .nbytes
271
247
You can’t perform that action at this time.
0 commit comments