ormats.style.Styler.set_properties.html)
    * [ pandas.io.formats.style.Styler.set_uuid ](pandas.io.formats.style.Styler.set_uuid.html)
    * [ pandas.io.formats.style.Styler.clear ](pandas.io.formats.style.Styler.clear.html)
    * [ pandas.io.formats.style.Styler.pipe ](pandas.io.formats.style.Styler.pipe.html)
    * [ pandas.io.formats.style.Styler.highlight_null ](pandas.io.formats.style.Styler.highlight_null.html)
    * [ pandas.io.formats.style.Styler.highlight_max ](pandas.io.formats.style.Styler.highlight_max.html)
    * [ pandas.io.formats.style.Styler.highlight_min ](pandas.io.formats.style.Styler.highlight_min.html)
    * [ pandas.io.formats.style.Styler.highlight_between ](pandas.io.formats.style.Styler.highlight_between.html)
    * [ pandas.io.formats.style.Styler.highlight_quantile ](pandas.io.formats.style.Styler.highlight_quantile.html)
    * [ pandas.io.formats.style.Styler.background_gradient ](pandas.io.formats.style.Styler.background_gradient.html)
    * [ pandas.io.formats.style.Styler.text_gradient ](pandas.io.formats.style.Styler.text_gradient.html)
    * pandas.io.formats.style.Styler.bar 
    * [ pandas.io.formats.style.Styler.to_html ](pandas.io.formats.style.Styler.to_html.html)
    * [ pandas.io.formats.style.Styler.to_latex ](pandas.io.formats.style.Styler.to_latex.html)
    * [ pandas.io.formats.style.Styler.to_excel ](pandas.io.formats.style.Styler.to_excel.html)
    * [ pandas.io.formats.style.Styler.to_string ](pandas.io.formats.style.Styler.to_string.html)
    * [ pandas.io.formats.style.Styler.export ](pandas.io.formats.style.Styler.export.html)
    * [ pandas.io.formats.style.Styler.use ](pandas.io.formats.style.Styler.use.html)
  * [ Plotting ](../plotting.html)
  * [ Options and settings ](../options.html)
  * [ Extensions ](../extensions.html)
  * [ Testing ](../testing.html)
  * [ Missing values ](../missing_value.html)

  * [ __ ](../../index.html)
  * [ API reference ](../index.html)
  * [ Style ](../style.html)
  * pandas.io.fo... 

#  pandas.io.formats.style.Styler.bar  #

Styler.  bar  (  _ subset  =  None  _ , _ axis  =  0  _ , _ *  _ , _ color  =
None  _ , _ cmap  =  None  _ , _ width  =  100  _ , _ height  =  100  _ , _
align  =  'mid'  _ , _ vmin  =  None  _ , _ vmax  =  None  _ , _ props  =
'width:  10em;'  _ )  [ [source]  ](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/io/formats/style.py#L3047-L3173) #

    

Draw bar chart in the cell backgrounds.

Changed in version 1.4.0.

Parameters  :

    

**subset** label, array-like, IndexSlice, optional

    

A valid 2d input to  DataFrame.loc[<subset>]  , or, in the case of a 1d input
or single key, to  DataFrame.loc[:, <subset>]  where the columns are
prioritised, to limit ` data  ` to _before_ applying the function.

**axis** {0 or âindexâ, 1 or âcolumnsâ, None}, default 0

    

Apply to each column ( ` axis=0  ` or ` 'index'  ` ), to each row ( ` axis=1
` or ` 'columns'  ` ), or to the entire DataFrame at once with ` axis=None  `
.

**color** str or 2-tuple/list

    

If a str is passed, the color is the same for both negative and positive
numbers. If 2-tuple/list is used, the first element is the color_negative and
the second is the color_positive (eg: [â#d65f5fâ, â#5fba7dâ]).

**cmap** str, matplotlib.cm.ColorMap

    

A string name of a matplotlib Colormap, or a Colormap object. Cannot be used
together with ` color  ` .

New in version 1.4.0.

**width** float, default 100

    

The percentage of the cell, measured from the left, in which to draw the bars,
in [0, 100].

**height** float, default 100

    

The percentage height of the bar in the cell, centrally aligned, in [0,100].

New in version 1.4.0.

**align** str, int, float, callable, default âmidâ

    

How to align the bars within the cells relative to a width adjusted center. If
string must be one of:

  * âleftâ : bars are drawn rightwards from the minimum data value. 

  * ârightâ : bars are drawn leftwards from the max