code: def replace_categorical_columns(pdf):
      new_df = pd.DataFrame()
      for c in pdf.columns:
          col = pdf[c]
          if col.dtype.name == "category":
              new_df[c] = col.astype("string")
          else:
              new_df[c] = pdf[c]
      return new_df
  
imports: import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: replace_categorical_columns(pdf) and returns: new_df