code: def encode_labels(df):
      le = sklearn.preprocessing.LabelEncoder()
      # apply le on categorical feature columns
      categorical_cols = df.select_dtypes(
          exclude=[
              "int",
              "float",
              "float64",
              "float32",
              "int32",
              "int64",
          ]
      ).columns
      df[categorical_cols] = df[categorical_cols].apply(
          lambda col: le.fit_transform(col)
      )
  
file_path: wandb/wandb/sklearn/utils.py
imports: from collections.abc import Iterable, Sequence
  import numpy
  import pandas
  import scipy
  import sklearn
  import wandb
label_desc: Use image node_id 3 for calling a global function with example usage: encode_labels(df) without return types