Detail: IndexHierarchyGO: Accessor String

Overview: IndexHierarchyGO: Accessor String

IndexHierarchyGO.via_str.__getitem__(key)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.__getitem__(key)[source]

Return a container with the provided selection or slice of each element.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str[-1]
[[' ' '7']
 ['Z' '7']
 ['3' '7']
 [' ' '1']]
IndexHierarchyGO.via_str.capitalize
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.capitalize()[source]

Return a container with only the first character of each element capitalized.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.capitalize()
[['Qrs ' '4/1/1517']
 ['Xyz' '12/31/1517']
 ['123' '6/30/1517']
 [' wx ' '12/31/2021']]
IndexHierarchyGO.via_str.center(width, fillchar)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.center(width, fillchar=' ')[source]

Return a container with its elements centered in a string of length width.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.center(8)
[['  qrs   ' '4/1/1517']
 ['  XYZ   ' '12/31/15']
 ['  123   ' '6/30/151']
 ['   wX   ' '12/31/20']]
IndexHierarchyGO.via_str.contains(item)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.contains(item)[source]

Return a Boolean container showing True of item is a substring of elements.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.contains('X')
[[False False]
 [ True False]
 [False False]
 [ True False]]
IndexHierarchyGO.via_str.count(sub, start, end)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.count(sub, start=None, end=None)[source]

Returns a container with the number of non-overlapping occurrences of substring sub in the optional range start, end.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.count('X')
[[0 0]
 [1 0]
 [0 0]
 [1 0]]
IndexHierarchyGO.via_str.decode(encoding, errors)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.decode(encoding=None, errors=None)[source]

Apply str.decode() to each element. Elements must be bytes.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021'))).astype(bytes)
>>> ih
<IndexHierarchyGO>
b'qrs '            b'4/1/1517'
b'XYZ'             b'12/31/1517'
b'123'             b'6/30/1517'
b' wX '            b'12/31/2021'
<|S4>              <|S10>
>>> ih.via_str.decode()
[['qrs ' '4/1/1517']
 ['XYZ' '12/31/1517']
 ['123' '6/30/1517']
 [' wX ' '12/31/2021']]
IndexHierarchyGO.via_str.encode(encoding, errors)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.encode(encoding=None, errors=None)[source]

Apply str.encode() to each element. Elements must be strings.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.encode()
[[b'qrs ' b'4/1/1517']
 [b'XYZ' b'12/31/1517']
 [b'123' b'6/30/1517']
 [b' wX ' b'12/31/2021']]
IndexHierarchyGO.via_str.endswith(suffix, start, end)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.endswith(suffix, start=None, end=None)[source]

Returns a container with the number of non-overlapping occurrences of substring suffix (or an iterable of suffixes) in the optional range start, end.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.endswith(' ')
[[ True False]
 [False False]
 [False False]
 [ True False]]
IndexHierarchyGO.via_str.find(sub, start, end)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.find(sub, start=None, end=None)[source]

For each element, return the lowest index in the string where substring sub is found.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.find('X')
[[-1 -1]
 [ 0 -1]
 [-1 -1]
 [ 2 -1]]
IndexHierarchyGO.via_str.format(format)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.format(format)[source]

For each element, return a string resulting from calling the string format argument’s format method with the the element. Format strings (given within curly braces) can use Python’s format mini language: https://docs.python.org/3/library/string.html#formatspec

Parameters:

format – A string, an iterable of strings, or a mapping of labels to strings. For 1D containers, an iterable of strings must be of length equal to the container; a mapping can use Index labels (for a Series) or positions (for an Index). For 2D containers, an iterable of strings must be of length equal to the columns (for a Frame) or the depth (for an Index Hierarchy); a mapping can use column labels (for a Frame) or depths (for an IndexHierarchy).

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.format('{:-^10}')
[['---qrs ---' '-4/1/1517-']
 ['---XYZ----' '12/31/1517']
 ['---123----' '6/30/1517-']
 ['--- wX ---' '12/31/2021']]
IndexHierarchyGO.via_str.index(sub, start, end)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.index(sub, start=None, end=None)[source]

Like find, but raises ValueError when the substring is not found.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.index('X')
ValueError('substring not found')
IndexHierarchyGO.via_str.isalnum
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isalnum()[source]

Returns true for each element if all characters in the string are alphanumeric and there is at least one character, false otherwise.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.isalnum()
[[False False]
 [ True False]
 [ True False]
 [False False]]
IndexHierarchyGO.via_str.isalpha
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isalpha()[source]

Returns true for each element if all characters in the string are alphabetic and there is at least one character, false otherwise.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.isalpha()
[[False False]
 [ True False]
 [False False]
 [False False]]
IndexHierarchyGO.via_str.isdecimal
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isdecimal()[source]

For each element, return True if there are only decimal characters in the element.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.isdecimal()
[[False False]
 [False False]
 [ True False]
 [False False]]
IndexHierarchyGO.via_str.isdigit
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isdigit()[source]

Returns true for each element if all characters in the string are digits and there is at least one character, false otherwise.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.isdigit()
[[False False]
 [False False]
 [ True False]
 [False False]]
IndexHierarchyGO.via_str.islower
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.islower()[source]

Returns true for each element if all cased characters in the string are lowercase and there is at least one cased character, false otherwise.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.islower()
[[ True False]
 [False False]
 [False False]
 [False False]]
IndexHierarchyGO.via_str.isnumeric
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isnumeric()[source]

For each element in self, return True if there are only numeric characters in the element.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.isnumeric()
[[False False]
 [False False]
 [ True False]
 [False False]]
IndexHierarchyGO.via_str.isspace
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isspace()[source]

Returns true for each element if there are only whitespace characters in the string and there is at least one character, false otherwise.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.isspace()
[[False False]
 [False False]
 [False False]
 [False False]]
IndexHierarchyGO.via_str.istitle
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.istitle()[source]

Returns true for each element if the element is a titlecased string and there is at least one character, false otherwise.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.istitle()
[[False False]
 [False False]
 [False False]
 [False False]]
IndexHierarchyGO.via_str.isupper
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.isupper()[source]

Returns true for each element if all cased characters in the string are uppercase and there is at least one character, false otherwise.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.isupper()
[[False False]
 [ True False]
 [False False]
 [False False]]
IndexHierarchyGO.via_str.ljust(width, fillchar)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.ljust(width, fillchar=' ')[source]

Return a container with its elements ljusted in a string of length width.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.ljust(8)
[['qrs     ' '4/1/1517']
 ['XYZ     ' '12/31/15']
 ['123     ' '6/30/151']
 [' wX     ' '12/31/20']]
IndexHierarchyGO.via_str.len
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.len()[source]

Return the length of the string.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.len()
[[ 4  8]
 [ 3 10]
 [ 3  9]
 [ 4 10]]
IndexHierarchyGO.via_str.lower
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.lower()[source]

Return an array with the elements of self converted to lowercase.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.lower()
[['qrs ' '4/1/1517']
 ['xyz' '12/31/1517']
 ['123' '6/30/1517']
 [' wx ' '12/31/2021']]
IndexHierarchyGO.via_str.lstrip(chars)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.lstrip(chars=None)[source]

For each element, return a copy with the leading characters removed.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.lstrip()
[['qrs ' '4/1/1517']
 ['XYZ' '12/31/1517']
 ['123' '6/30/1517']
 ['wX ' '12/31/2021']]
IndexHierarchyGO.via_str.partition(sep)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.partition(sep)[source]

Partition each element around sep.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.partition('X')
[[('qrs ', '', '') ('4/1/1517', '', '')]
 [('', 'X', 'YZ') ('12/31/1517', '', '')]
 [('123', '', '') ('6/30/1517', '', '')]
 [(' w', 'X', ' ') ('12/31/2021', '', '')]]
IndexHierarchyGO.via_str.replace(old, new, count)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.replace(old, new, count=None)[source]

Return a container with its elements replaced in a string of length width.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.replace('X', '*')
[['qrs ' '4/1/1517']
 ['*YZ' '12/31/1517']
 ['123' '6/30/1517']
 [' w* ' '12/31/2021']]
IndexHierarchyGO.via_str.rfind(sub, start, end)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rfind(sub, start=None, end=None)[source]

For each element, return the highest index in the string where substring sub is found, such that sub is contained within start, end.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.rfind('X')
[[-1 -1]
 [ 0 -1]
 [-1 -1]
 [ 2 -1]]
IndexHierarchyGO.via_str.rindex(sub, start, end)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rindex(sub, start=None, end=None)[source]

Like rfind, but raises ValueError when the substring sub is not found.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.rindex('X')
ValueError('substring not found')
IndexHierarchyGO.via_str.rjust(width, fillchar)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rjust(width, fillchar=' ')[source]

Return a container with its elements rjusted in a string of length width.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.rjust(8)
[['    qrs ' '4/1/1517']
 ['     XYZ' '12/31/15']
 ['     123' '6/30/151']
 ['     wX ' '12/31/20']]
IndexHierarchyGO.via_str.rpartition(sep)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rpartition(sep)[source]

Partition (split) each element around the right-most separator.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.rpartition('X')
[[('', '', 'qrs ') ('', '', '4/1/1517')]
 [('', 'X', 'YZ') ('', '', '12/31/1517')]
 [('', '', '123') ('', '', '6/30/1517')]
 [(' w', 'X', ' ') ('', '', '12/31/2021')]]
IndexHierarchyGO.via_str.rsplit(sep, maxsplit)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rsplit(sep, maxsplit=-1)[source]

For each element, return a tuple of the words in the string, using sep as the delimiter string.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.rsplit('X')
[[('qrs ',) ('4/1/1517',)]
 [('', 'YZ') ('12/31/1517',)]
 [('123',) ('6/30/1517',)]
 [(' w', ' ') ('12/31/2021',)]]
IndexHierarchyGO.via_str.rstrip(chars)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.rstrip(chars=None)[source]

For each element, return a copy with the trailing characters removed.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.rstrip()
[['qrs' '4/1/1517']
 ['XYZ' '12/31/1517']
 ['123' '6/30/1517']
 [' wX' '12/31/2021']]
IndexHierarchyGO.via_str.split(sep, maxsplit)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.split(sep, maxsplit=-1)[source]

For each element, return a tuple of the words in the string, using sep as the delimiter string.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.split('X')
[[('qrs ',) ('4/1/1517',)]
 [('', 'YZ') ('12/31/1517',)]
 [('123',) ('6/30/1517',)]
 [(' w', ' ') ('12/31/2021',)]]
IndexHierarchyGO.via_str.startswith(prefix, start, end)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.startswith(prefix, start=None, end=None)[source]

Returns a container with the number of non-overlapping occurrences of substring prefix (or an iterable of prefixes) in the optional range start, end.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.startswith('X')
[[False False]
 [ True False]
 [False False]
 [False False]]
IndexHierarchyGO.via_str.strip(chars)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.strip(chars=None)[source]

For each element, return a copy with the leading and trailing characters removed.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.strip()
[['qrs' '4/1/1517']
 ['XYZ' '12/31/1517']
 ['123' '6/30/1517']
 ['wX' '12/31/2021']]
IndexHierarchyGO.via_str.swapcase
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.swapcase()[source]

Return a container with uppercase characters converted to lowercase and vice versa.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.swapcase()
[['QRS ' '4/1/1517']
 ['xyz' '12/31/1517']
 ['123' '6/30/1517']
 [' Wx ' '12/31/2021']]
IndexHierarchyGO.via_str.title
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.title()[source]

Return a container with uppercase characters converted to lowercase and vice versa.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.title()
[['Qrs ' '4/1/1517']
 ['Xyz' '12/31/1517']
 ['123' '6/30/1517']
 [' Wx ' '12/31/2021']]
IndexHierarchyGO.via_str.upper
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.upper()[source]

Return a container with uppercase characters converted to lowercase and vice versa.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.upper()
[['QRS ' '4/1/1517']
 ['XYZ' '12/31/1517']
 ['123' '6/30/1517']
 [' WX ' '12/31/2021']]
IndexHierarchyGO.via_str.zfill(width)
IndexHierarchyGO.via_str

Interface for applying string methods to elements in this container.

InterfaceString.zfill(width)[source]

Return the string left-filled with zeros.

>>> ih = sf.IndexHierarchyGO.from_labels((('qrs ', '4/1/1517'), ('XYZ', '12/31/1517'), ('123', '6/30/1517'), (' wX ', '12/31/2021')))
>>> ih
<IndexHierarchyGO>
qrs                4/1/1517
XYZ                12/31/1517
123                6/30/1517
 wX                12/31/2021
<<U4>              <<U10>
>>> ih.via_str.zfill(8)
[['0000qrs ' '4/1/1517']
 ['00000XYZ' '12/31/15']
 ['00000123' '6/30/151']
 ['0000 wX ' '12/31/20']]

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