# uproot.behaviors.TProfile2D.TProfile2D

Defined in [uproot.behaviors.TProfile2D](https://github.com/scikit-hep/uproot/blob/f1299d71fa4f435b1901386346c8a42adbd72642/src/uproot/behaviors/TProfile2D.py) on [line 17](https://github.com/scikit-hep/uproot/blob/f1299d71fa4f435b1901386346c8a42adbd72642/src/uproot/behaviors/TProfile2D.py#L17).

| **Inheritance order:**                                                                                                                                                   |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1. [uproot.behaviors.TProfile.Profile](uproot.behaviors.TProfile.Profile.html.md)<br/>2. [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md) |

### *class* uproot.behaviors.TProfile2D.TProfile2D

Behaviors for two-dimensional profiles: ROOT’s `TProfile2D`.

<a id="uproot-behaviors-tprofile2d-tprofile2d-name"></a>

## name

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.name

The name of the histogram.

<a id="uproot-behaviors-tprofile2d-tprofile2d-title"></a>

## title

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.title

The title of the histogram.

<a id="uproot-behaviors-tprofile2d-tprofile2d-axes"></a>

## axes

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.axes

<a id="uproot-behaviors-tprofile2d-tprofile2d-axis"></a>

## axis

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.axis(axis)

Returns a specified [uproot.behaviors.TAxis.TAxis](uproot.behaviors.TAxis.TAxis.html.md) object.

The `axis` can be specified as

* a non-negative integer: `0` is the first axis, `1` is the second,
  and `2` is the third.
* a negative integer: `-1` is the last axis, `-2` is the
  second-to-last, and `-3` is the third-to-last.
* a string: `"x"` is the first axis, `"y"` is the second, and `"z"`
  is the third

(assuming that the histogram dimension supports a given `axis`).

<a id="uproot-behaviors-tprofile2d-tprofile2d-weighted"></a>

## weighted

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.weighted

<a id="uproot-behaviors-tprofile2d-tprofile2d-kind"></a>

## kind

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.kind

<a id="uproot-behaviors-tprofile2d-tprofile2d-values"></a>

## values

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.values(flow=False)

* **Parameters:**
  **flow** (*bool*) – If True, include underflow and overflow bins before and
  after the normal (finite-width) bins.

Mean value of each bin as a 1, 2, or 3 dimensional `numpy.ndarray` of
`numpy.float64`.

Setting `flow=True` increases the length of each dimension by two.

<a id="uproot-behaviors-tprofile2d-tprofile2d-errors"></a>

## errors

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.errors(flow=False, error_mode='')

* **Parameters:**
  * **flow** (*bool*) – If True, include underflow and overflow bins before and
    after the normal (finite-width) bins.
  * **error_mode** (*str*) – Choose a method for calculating the errors (see below).

Errors (uncertainties) in the [values](uproot.behaviors.TH1.Histogram.html.md#uproot-behaviors-th1-histogram-values)
as a 1, 2, or 3 dimensional `numpy.ndarray` of `numpy.float64`.

The calculation of profile errors exactly follows ROOT’s function, but
in a vectorized NumPy form. The `error_mode` may be

* `""` for standard error on the mean
* `"s"` for spread
* `"i"` for integer data
* `"g"` for Gaussian

following [ROOT’s profile documentation](https://root.cern.ch/doc/master/classTProfile.html).

Setting `flow=True` increases the length of each dimension by two.

<a id="uproot-behaviors-tprofile2d-tprofile2d-variances"></a>

## variances

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.variances(flow=False, error_mode='')

* **Parameters:**
  * **flow** (*bool*) – If True, include underflow and overflow bins before and
    after the normal (finite-width) bins.
  * **error_mode** (*str*) – Choose a method for calculating the errors (see below).

Variances (uncertainties squared) in the
[values](uproot.behaviors.TH1.Histogram.html.md#uproot-behaviors-th1-histogram-values) as a 1, 2, or 3
dimensional `numpy.ndarray` of `numpy.float64`.

The calculation of profile variances exactly follows ROOT’s function, but
in a vectorized NumPy form. The `error_mode` may be

* `""` for standard error on the mean (squared)
* `"s"` for spread (squared)
* `"i"` for integer data (squared)
* `"g"` for Gaussian (squared)

following [ROOT’s profile documentation](https://root.cern.ch/doc/master/classTProfile.html).

Setting `flow=True` increases the length of each dimension by two.

<a id="uproot-behaviors-tprofile2d-tprofile2d-counts"></a>

## counts

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.counts(flow=False)

* **Parameters:**
  **flow** (*bool*) – If True, include underflow and overflow bins before and
  after the normal (finite-width) bins.

The effective number of entries, which is a step in the calculation of
[values](uproot.behaviors.TProfile.Profile.html.md#uproot-behaviors-tprofile-profile-values). The calculation
of profile errors exactly follows ROOT’s “effective entries”, but in a
vectorized NumPy form.

<a id="uproot-behaviors-tprofile2d-tprofile2d-to-boost"></a>

## to_boost

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.to_boost(metadata={'label': 'fTitle', 'name': 'fName'}, axis_metadata={'label': 'fTitle', 'name': 'fName'})

* **Parameters:**
  * **metadata** (*dict* *of* *str → str*) – Metadata to collect (keys) and
    their C++ class member names (values).
  * **axis_metadata** (*dict* *of* *str → str*) – Metadata to collect from
    each axis.

Converts the histogram into a `boost-histogram` object.

<a id="uproot-behaviors-tprofile2d-tprofile2d-to-hist"></a>

## to_hist

Inherited from [uproot.behaviors.TH1.Histogram](uproot.behaviors.TH1.Histogram.html.md).

#### TProfile2D.to_hist(metadata=None, axis_metadata=None)

* **Parameters:**
  * **metadata** (*dict* *of* *str → str*) – Metadata to collect (keys) and
    their C++ class member names (values).
  * **axis_metadata** (*dict* *of* *str → str*) – Metadata to collect from
    each axis.

Converts the histogram into a `hist` object.
