join(self, sep)
If the elements of a Series are lists themselves, join the content of these lists using the delimiter passed to the function. This function is an equivalent to str.join
.
If any of the list items is not a string object, the result of the join will be NaN
.
Delimiter to use between list entries.
If the supplied Series contains neither strings nor lists.
The list entries concatenated by intervening occurrences of the delimiter.
Join lists contained as elements in the Series/Index with passed delimiter.
Series.str.split
Split strings around given separator/delimiter.
str.join
Standard library version of this method.
Example with a list that contains non-string elements.
This example is valid syntax, but we were not able to check execution>>> s = pd.Series([['lion', 'elephant', 'zebra'],
... [1.1, 2.2, 3.3],
... ['cat', np.nan, 'dog'],
... ['cow', 4.5, 'goat'],
... ['duck', ['swan', 'fish'], 'guppy']])
... s 0 [lion, elephant, zebra] 1 [1.1, 2.2, 3.3] 2 [cat, nan, dog] 3 [cow, 4.5, goat] 4 [duck, [swan, fish], guppy] dtype: object
Join all lists using a '-'. The lists containing object(s) of types other than str will produce a NaN.
This example is valid syntax, but we were not able to check execution>>> s.str.join('-') 0 lion-elephant-zebra 1 NaN 2 NaN 3 NaN 4 NaN dtype: objectSee :
The following pages refer to to this document either explicitly or contain code examples using this.
pandas.core.strings.accessor.StringMethods.cat
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them