parameters: (
      values: Any,
      formatter: Optional[Callable],
      float_format: Optional[float_format_type] = None,
      na_rep: str = "NaN",
      digits: Optional[int] = None,
      space: Optional[Union[str, int]] = None,
      justify: str = "right",
      decimal: str = ".",
      leading_space: Optional[bool] = None,
  )
return_statement: return fmt_obj.get_result()
docstring: Format an array for printing.
  
      Parameters
      ----------
      values
      formatter
      float_format
      na_rep
      digits
      space
      justify
      decimal
      leading_space : bool, optional
          Whether the array should be formatted with a leading space.
          When an array as a column of a Series or DataFrame, we do want
          the leading space to pad between columns.
  
          When formatting an Index subclass
          (e.g. IntervalIndex._format_native_types), we don't want the
          leading space since it should be left-aligned.
  
      Returns
      -------
      List[str]
docstring_summary: Format an array for printing.
docstring_tokens: Format an array for printing .
function: def format_array(
      values: Any,
      formatter: Optional[Callable],
      float_format: Optional[float_format_type] = None,
      na_rep: str = "NaN",
      digits: Optional[int] = None,
      space: Optional[Union[str, int]] = None,
      justify: str = "right",
      decimal: str = ".",
      leading_space: Optional[bool] = None,
  ) -> List[str]:
      """
      Format an array for printing.
  
      Parameters
      ----------
      values
      formatter
      float_format
      na_rep
      digits
      space
      justify
      decimal
      leading_space : bool, optional
          Whether the array should be formatted with a leading space.
          When an array as a column of a Series or DataFrame, we do want
          the leading space to pad between columns.
  
          When formatting an Index subclass
          (e.g. IntervalIndex._format_native_types), we don't want the
          leading space since it should be left-aligned.
  
      Returns
      -------
      List[str]
      """
  
      fmt_klass: Type[GenericArrayFormatter]
      if is_datetime64_dtype(values.dtype):
          fmt_klass = Datetime64Formatter
      elif is_datetime64tz_dtype(values):
          fmt_klass = Datetime64TZFormatter
      elif is_timedelta64_dtype(values.dtype):
          fmt_klass = Timedelta64Formatter
      elif is_extension_array_dtype(values.dtype):
          fmt_klass = ExtensionArrayFormatter
      elif is_float_dtype(values.dtype) or is_complex_dtype(values.dtype):
          fmt_klass = FloatArrayFormatter
      elif is_integer_dtype(values.dtype):
          fmt_klass = IntArrayFormatter
      else:
          fmt_klass = GenericArrayFormatter
  
      if space is None:
          space = get_option("display.column_space")
  
      if float_format is None:
          float_format = get_option("display.float_format")
  
      if digits is None:
          digits = get_option("display.precision")
  
      fmt_obj = fmt_klass(
          values,
          digits=digits,
          na_rep=na_rep,
          float_format=float_format,
          formatter=formatter,
          space=space,
          justify=justify,
          decimal=decimal,
          leading_space=leading_space,
      )
  
      return fmt_obj.get_result()
function_tokens: def format_array ( values : Any , formatter : Optional [ Callable ] , float_format : Optional [ float_format_type ] = None , na_rep : str = "NaN" , digits : Optional [ int ] = None , space : Optional [ Union [ str , int ] ] = None , justify : str = "right" , decimal : str = "." , leading_space : Optional [ bool ] = None , ) -> List [ str ] : fmt_klass : Type [ GenericArrayFormatter ] if is_datetime64_dtype ( values . dtype ) : fmt_klass = Datetime64Formatter elif is_datetime64tz_dtype ( values ) : fmt_klass = Datetime64TZFormatter elif is_timedelta64_dtype ( values . dtype ) : fmt_klass = Timedelta64Formatter elif is_extension_array_dtype ( values . dtype ) : fmt_klass = ExtensionArrayFormatter elif is_float_dtype ( values . dtype ) or is_complex_dtype ( values . dtype ) : fmt_klass = FloatArrayFormatter elif is_integer_dtype ( values . dtype ) : fmt_klass = IntArrayFormatter else : fmt_klass = GenericArrayFormatter if space is None : space = get_option ( "display.column_space" ) if float_format is None : float_format = get_option ( "display.float_format" ) if digits is None : digits = get_option ( "display.precision" ) fmt_obj = fmt_klass ( values , digits = digits , na_rep = na_rep , float_format = float_format , formatter = formatter , space = space , justify = justify , decimal = decimal , leading_space = leading_space , ) return fmt_obj . get_result ( )