Detail: MemoryDisplay: Constructor¶
Overview: MemoryDisplay: Constructor
- MemoryDisplay.__init__(frame)[source]¶
Initialize an instance with a
Frame
of byte counts.>>> f = sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x') >>> f.memory L Lu LM LMu LMD LMDu R Ru RM RMu RMD RMDu Name 50 B 50 B 50 B 50 B 50 B 50 B Index 216 B 232 B 120 B 8.3 KB 264 B 152 B Columns 764 B 796 B 572 B 8.84 KB 820 B 596 B Blocks 1.4 KB 1.45 KB 1.12 KB 1.4 KB 1.45 KB 1.12 KB Total 2.44 KB 2.53 KB 1.88 KB 10.53 KB 2.59 KB 1.93 KB
- classmethod MemoryDisplay.from_any(obj, label_component_pairs=())[source]¶
Given any slotted object, return a
MemoryDisplay
instance.>>> f = sf.Frame.from_fields(((10, 2, 8, 3), (False, True, True, False), ('1517-01-01', '1517-04-01', '1517-12-31', '1517-06-30')), columns=('a', 'b', 'c'), dtypes=dict(c=np.datetime64), name='x') >>> sf.MemoryDisplay.from_any(f.index) L Lu LM LMu LMD LMDu R Ru RM RMu RMD RMDu Total 216 B 232 B 120 B 8.3 KB 264 B 152 B