Skip to main content
`Ctrl`+`K`

# pandas.set_eng_float_format

pandas.set_eng_float_format(accuracy=3, use_eng_prefix=False)

  Format float representation in DataFrame with SI notation.

  Deprecated since version 3.1.0: Use `pd.set_option("display.precision", N)` to control decimal precision, or pass a custom callable to `pd.set_option("display.float_format", func)`.

  Sets the floating-point display format for `DataFrame` objects using engineering notation (SI units), allowing easier readability of values across wide ranges.

  Parameters:
    accuracy int, default 3

      Number of decimal digits after the floating point.

    use_eng_prefix bool, default False

      Whether to represent a value with SI prefixes.

  Returns:
    None

      This method does not return a value. it updates the global display format for floats in DataFrames.

  See also

  `set_option`

    Set the value of the specified option or options.

  `reset_option`

    Reset one or more options to their default value.

  Examples

  Use `pd.set_option("display.precision", N)` to control decimal precision instead:

      >>> with pd.option_context("display.precision", 3):
      ...     print(pd.DataFrame([1e-9, 1e-3, 1, 1e3, 1e6]))
                 0
      0  1.000e-09
      1  1.000e-03
      2  1.000e+00
      3  1.000e+03
      4  1.000e+06