bigframes.pandas.Series.name#

property Series.name: Hashable#

Return the name of the Series.

The name of a Series becomes its index or column name if it is used to form a DataFrame. It is also used whenever displaying the Series using the interpreter.

Examples:

For a Series:

>>> s = bpd.Series([1, 2, 3], dtype="Int64", name='Numbers')
>>> s
0    1
1    2
2    3
Name: Numbers, dtype: Int64
>>> s.name
'Numbers'
>>> s.name = "Integers"
>>> s
0    1
1    2
2    3
Name: Integers, dtype: Int64

If the Series is part of a DataFrame:

>>> df = bpd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df
   col1  col2
0     1     3
1     2     4

[2 rows x 2 columns]
>>> s = df["col1"]
>>> s.name
'col1'
Returns:

The name of the Series, also the column name if part of a DataFrame.

Return type:

hashable object