cudf.Series.to_frame#

Series.to_frame(name=None)[source]#

Convert Series into a DataFrame

Parameters:
namestr, default None

Name to be used for the column

Returns:
DataFrame

cudf DataFrame

Examples

>>> import cudf
>>> series = cudf.Series(['a', 'b', 'c', None, 'd'], name='sample', index=[10, 11, 12, 13, 15])
>>> series
10       a
11       b
12       c
13    <NA>
15       d
Name: sample, dtype: object
>>> series.to_frame()
   sample
10      a
11      b
12      c
13   <NA>
15      d