cudf.Series.reindex#

Series.reindex(index=None, copy=True)#

Return a Series that conforms to a new index

Parameters
indexIndex, Series-convertible, default None
copyboolean, default True
Returns
A new Series that conforms to the supplied index

Examples

>>> import cudf
>>> series = cudf.Series([10, 20, 30, 40], index=['a', 'b', 'c', 'd'])
>>> series
a    10
b    20
c    30
d    40
dtype: int64
>>> series.reindex(['a', 'b', 'y', 'z'])
a      10
b      20
y    <NA>
z    <NA>
dtype: int64