parameters: (
      data: Series,
      percentiles_ignored: Sequence[float],
  )
return_statement: return Series(result, index=names, name=data.name, dtype=dtype)
docstring: Describe series containing categorical data.
  
      Parameters
      ----------
      data : Series
          Series to be described.
      percentiles_ignored : list-like of numbers
          Ignored, but in place to unify interface.
docstring_summary: Describe series containing categorical data.
docstring_tokens: Describe series containing categorical data .
function: def describe_categorical_1d(
      data: Series,
      percentiles_ignored: Sequence[float],
  ) -> Series:
      """Describe series containing categorical data.
  
      Parameters
      ----------
      data : Series
          Series to be described.
      percentiles_ignored : list-like of numbers
          Ignored, but in place to unify interface.
      """
      names = ["count", "unique", "top", "freq"]
      objcounts = data.value_counts()
      count_unique = len(objcounts[objcounts != 0])
      if count_unique > 0:
          top, freq = objcounts.index[0], objcounts.iloc[0]
          dtype = None
      else:
          # If the DataFrame is empty, set 'top' and 'freq' to None
          # to maintain output shape consistency
          top, freq = np.nan, np.nan
          dtype = "object"
  
      result = [data.count(), count_unique, top, freq]
  
      from pandas import Series
  
      return Series(result, index=names, name=data.name, dtype=dtype)
function_tokens: def describe_categorical_1d ( data : Series , percentiles_ignored : Sequence [ float ] , ) -> Series : names = [ "count" , "unique" , "top" , "freq" ] objcounts = data . value_counts ( ) count_unique = len ( objcounts [ objcounts != 0 ] ) if count_unique > 0 : top , freq = objcounts . index [ 0 ] , objcounts . iloc [ 0 ] dtype = None else : # If the DataFrame is empty, set 'top' and 'freq' to None # to maintain output shape consistency top , freq = np . nan , np . nan dtype = "object" result = [ data . count ( ) , count_unique , top , freq ] from pandas import Series return Series ( result , index = names , name = data . name , dtype = dtype )