def select_fields(
        self, field_names=None, meta_filter=None, _allow_missing=False
    ):
        """Selects only the fields with the given names from the samples in the
        collection. All other fields are excluded.

        Note that default sample fields are always selected.

        Examples::

            import fiftyone as fo

            dataset = fo.Dataset()
            dataset.add_samples(
                [
                    fo.Sample(
                        filepath="/path/to/image1.png",
                        uniqueness=1.0,
                        ground_truth=fo.Detections(
                            detections=[
                                fo.Detection(
                                    label="cat",
                                    bounding_box=[0.1, 0.1, 0.5, 0.5],
                                    mood="surly",
                                    age=51,
                                ),
                                fo.Detection(
                                    label="dog",
                                    bounding_box=[0.2, 0.2, 0.3, 0.3],
                                    mood="happy",
                                    age=52,
                                ),
                            ]
                        )
                    ),
                    fo.Sample(
                        filepath="/path/to/image2.png",
                        uniqueness=0.0,
                    ),
                    fo.Sample(
                        filepath="/path/to/image3.png",
                    ),
                ]
            )

            #
            # Include only the default fields on each sample
            #

            view = dataset.select_fields()

            #
            # Include only the `uniqueness` field (and the default fields) on
            # each sample
            #

            view = dataset.select_fields("uniqueness")

            #
            # Include only the `mood` attribute (and the default attributes) of
            # each `Detection` in the `ground_truth` field
            #

            view = dataset.select_fields("ground_truth.detections.mood")

        Args:
            field_names (None): a field name or iterable of field names to
                select. May contain ``embedded.field.name`` as well
            meta_filter (None): a filter that dynamically selects fields in
                the collection's schema according to the specified rule, which
                can be matched against the field's ``name``, ``type``,
                ``description``, and/or ``info``. For example:

                -   Use ``meta_filter="2023"`` or
                    ``meta_filter={"any": "2023"}`` to select fields that have
                    the string "2023" anywhere in their name, type,
                    description, or info
                -   Use ``meta_filter={"type": "StringField"}`` or
                    ``meta_filter={"type": "Classification"}`` to select all
                    string or classification fields, respectively
                -   Use ``meta_filter={"description": "my description"}`` to
                    select fields whose description contains the string
                    "my description"
                -   Use ``meta_filter={"info": "2023"}`` to select fields that
                    have the string "2023" anywhere in their info
                -   Use ``meta_filter={"info.key": "value"}}`` to select
                    fields that have a specific key/value pair in their info
                -   Include ``meta_filter={"include_nested_fields": True, ...}``
                    in your meta filter to include all nested fields in the
                    filter

        Returns:
            a :class:`fiftyone.core.view.DatasetView`
        """
        return self._add_view_stage(
            fos.SelectFields(
                field_names,
                meta_filter=meta_filter,
                _allow_missing=_allow_missing,
            )
        )
Selects only the fields with the given names from the samples in the
        collection. All other fields are excluded.

        Note that default sample fields are always selected.

        Examples::

            import fiftyone as fo

            dataset = fo.Dataset()
            dataset.add_samples(
                [
                    fo.Sample(
                        filepath="/path/to/image1.png",
                        uniqueness=1.0,
                        ground_truth=fo.Detections(
                            detections=[
                                fo.Detection(
                                    label="cat",
                                    bounding_box=[0.1, 0.1, 0.5, 0.5],
                                    mood="surly",
                                    age=51,
                                ),
                                fo.Detection(
                                    label="dog",
                                    bounding_box=[0.2, 0.2, 0.3, 0.3],
                                    mood="happy",
                                    age=52,
                                ),
                            ]
                        )
                    ),
                    fo.Sample(
                        filepath="/path/to/image2.png",
                        uniqueness=0.0,
                    ),
                    fo.Sample(
                        filepath="/path/to/image3.png",
                    ),
                ]
            )

            #
            # Include only the default fields on each sample
            #

            view = dataset.select_fields()

            #
            # Include only the `uniqueness` field (and the default fields) on
            # each sample
            #

            view = dataset.select_fields("uniqueness")

            #
            # Include only the `mood` attribute (and the default attributes) of
            # each `Detection` in the `ground_truth` field
            #

            view = dataset.select_fields("ground_truth.detections.mood")

        Args:
            field_names (None): a field name or iterable of field names to
                select. May contain ``embedded.field.name`` as well
            meta_filter (None): a filter that dynamically selects fields in
                the collection's schema according to the specified rule, which
                can be matched against the field's ``name``, ``type``,
                ``description``, and/or ``info``. For example:

                -   Use ``meta_filter="2023"`` or
                    ``meta_filter={"any": "2023"}`` to select fields that have
                    the string "2023" anywhere in their name, type,
                    description, or info
                -   Use ``meta_filter={"type": "StringField"}`` or
                    ``meta_filter={"type": "Classification"}`` to select all
                    string or classification fields, respectively
                -   Use ``meta_filter={"description": "my description"}`` to
                    select fields whose description contains the string
                    "my description"
                -   Use ``meta_filter={"info": "2023"}`` to select fields that
                    have the string "2023" anywhere in their info
                -   Use ``meta_filter={"info.key": "value"}}`` to select
                    fields that have a specific key/value pair in their info
                -   Include ``meta_filter={"include_nested_fields": True, ...}``
                    in your meta filter to include all nested fields in the
                    filter

        Returns:
            a :class:`fiftyone.core.view.DatasetView`
        
fiftyone/core/collections.py