Detail: IndexHierarchyGO: Exporter
Overview: IndexHierarchyGO: Exporter
- IndexHierarchyGO.to_frame()
Return
Frame
version of thisIndexHierarchy
.>>> ih = sf.IndexHierarchyGO.from_labels((('a', 1024, True), ('a', 2048, True), ('a', 2048, False), ('b', 1024, True)), name='x') >>> ih <IndexHierarchyGO: x> a 1024 True a 2048 True a 2048 False b 1024 True <<U1> <int64> <bool> >>> ih.to_frame() <Frame> <Index> 0 1 2 <int64> <Index> 0 a 1024 True 1 a 2048 True 2 a 2048 False 3 b 1024 True <int64> <<U1> <int64> <bool>
- IndexHierarchyGO.to_frame_go()
Return a
FrameGO
version of thisIndexHierarchy
.>>> ih = sf.IndexHierarchyGO.from_labels((('a', 1024, True), ('a', 2048, True), ('a', 2048, False), ('b', 1024, True)), name='x') >>> ih <IndexHierarchyGO: x> a 1024 True a 2048 True a 2048 False b 1024 True <<U1> <int64> <bool> >>> ih.to_frame_go() <FrameGO> <IndexGO> 0 1 2 <int64> <Index> 0 a 1024 True 1 a 2048 True 2 a 2048 False 3 b 1024 True <int64> <<U1> <int64> <bool>
- IndexHierarchyGO.to_html(config=None, style_config=<static_frame.core.style_config.StyleConfig object>)
Return an HTML table representation of this
Index
using standard TABLE, TR, and TD tags. This is not a complete HTML page.- Parameters:
config – Optional
DisplayConfig
instance.- Returns:
str
- IndexHierarchyGO.to_html_datatables(fp=None, *, show=True, config=None)
Return a complete HTML representation of this
Index
using the DataTables JS library for table naviagation and search. The page links to CDNs for JS resources, and thus will not fully render without an internet connection.- Parameters:
fp – optional file path to write; if not provided, a temporary file will be created. Note: the caller is responsible for deleting this file.
show – if True, the file will be opened with a webbrowser.
config – Optional
DisplayConfig
instance.
- Returns:
str
, absolute file path to the file written.
- IndexHierarchyGO.to_pandas()
Return a Pandas MultiIndex.
>>> ih = sf.IndexHierarchyGO.from_labels((('a', 1024, True), ('a', 2048, True), ('a', 2048, False), ('b', 1024, True)), name='x') >>> ih <IndexHierarchyGO: x> a 1024 True a 2048 True a 2048 False b 1024 True <<U1> <int64> <bool> >>> ih.to_pandas() MultiIndex([('a', 1024, True), ('a', 2048, True), ('a', 2048, False), ('b', 1024, True)], name='x')
- IndexHierarchyGO.to_tree()
Returns the tree representation of an IndexHierarchy
>>> ih = sf.IndexHierarchyGO.from_labels((('a', 1024, True), ('a', 2048, True), ('a', 2048, False), ('b', 1024, True)), name='x') >>> ih <IndexHierarchyGO: x> a 1024 True a 2048 True a 2048 False b 1024 True <<U1> <int64> <bool> >>> ih.to_tree() {'a': {1024: <IndexGO> True <bool>, 2048: <IndexGO> True False <bool>}, 'b': {1024: <IndexGO> True <bool>}}
- IndexHierarchyGO.to_visidata()
Open an interactive VisiData session.
IndexHierarchyGO: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Transpose | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic