class_docstr: Series.struct namespace.
class_docstr_tok: ["Series.struct","namespace","."]
docstr: Get the names of the fields.
docstr_tok: ["Get","the","names","of","the","fields","."]
code: def fields(self) -> list[str]:
      """Get the names of the fields."""
      if getattr(self, "_s", None) is None:
          return []
      return self._s.struct_fields()
  
file_path: polars/py-polars/polars/series/struct.py
imports: from __future__ import annotations
  import os
  from collections import OrderedDict
  from typing import TYPE_CHECKING, Sequence
  from polars.series.utils import expr_dispatch
  from polars.utils._wrap import wrap_df
  from polars.utils.various import sphinx_accessor
label_desc: Use image node_id 4 for calling the StructNameSpace obj's underlying member method code with example usage: obj.fields() and returns: self, list