# dask.dataframe.Series.str.join

#### dataframe.Series.str.join(sep: [str](https://docs.python.org/3/builtins/stdtypes.html#str))

Join lists contained as elements in the Series/Index with passed delimiter.

This docstring was copied from pandas.core.strings.accessor.StringMethods.join.

Some inconsistencies with the Dask version may exist.

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()`](https://docs.python.org/3/builtins/stdtypes.html#str.join).

* **Parameters:**
  **sep**
  : Delimiter to use between list entries.
* **Returns:**
  Series/Index: object
  : The list entries concatenated by intervening occurrences of the
    delimiter.
* **Raises:**
  AttributeError
  : If the supplied Series contains neither strings nor lists.

#### SEE ALSO
[`str.join`](https://docs.python.org/3/builtins/stdtypes.html#str.join)
: Standard library version of this method.

`Series.str.split`
: Split strings around given separator/delimiter.

### Notes

If any of the list items is not a string object, the result of the join
will be NaN.

### Examples

Example with a list that contains non-string elements.

```pycon
>>> 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.

```pycon
>>> s.str.join("-")
0    lion-elephant-zebra
1                    NaN
2                    NaN
3                    NaN
4                    NaN
dtype: object
```

<!-- !! processed by numpydoc !! -->
