class_docstr: Provide exponentially weighted (EW) calculations.
  
  Exactly one of ``com``, ``span``, ``halflife``, or ``alpha`` must be
  provided if ``times`` is not provided. If ``times`` is provided,
  ``halflife`` and one of ``com``, ``span`` or ``alpha`` may be provided.
  
  Parameters
  ----------
  com : float, optional
      Specify decay in terms of center of mass
  
      :math:`\alpha = 1 / (1 + com)`, for :math:`com \geq 0`.
  
  span : float, optional
      Specify decay in terms of span
  
      :math:`\alpha = 2 / (span + 1)`, for :math:`span \geq 1`.
  
  halflife : float, str, timedelta, optional
      Specify decay in terms of half-life
  
      :math:`\alpha = 1 - \exp\left(-\ln(2) / halflife\right)`, for
      :math:`halflife > 0`.
  
      If ``times`` is specified, a timedelta convertible unit over which an
      observation decays to half its value. Only applicable to ``mean()``,
      and halflife value will not apply to the other functions.
  
  alpha : float, optional
      Specify smoothing factor :math:`\alpha` directly
  
      :math:`0 < \alpha \leq 1`.
  
  min_periods : int, default 0
      Minimum number of observations in window required to have a value;
      otherwise, result is ``np.nan``.
  
  adjust : bool, default True
      Divide by decaying adjustment factor in beginning periods to account
      for imbalance in relative weightings (viewing EWMA as a moving average).
  
      - When ``adjust=True`` (default), the EW function is calculated using weights
        :math:`w_i = (1 - \alpha)^i`. For example, the EW moving average of the series
        [:math:`x_0, x_1, ..., x_t`] would be:
  
      .. math::
          y_t = \frac{x_t + (1 - \alpha)x_{t-1} + (1 - \alpha)^2 x_{t-2} + ... + (1 -
          \alpha)^t x_0}{1 + (1 - \alpha) + (1 - \alpha)^2 + ... + (1 - \alpha)^t}
  
      - When ``adjust=False``, the exponentially weighted function is calculated
        recursively:
  
      .. math::
          \begin{split}
              y_0 &= x_0\\
              y_t &= (1 - \alpha) y_{t-1} + \alpha x_t,
          \end{split}
  ignore_na : bool, default False
      Ignore missing values when calculating weights.
  
      - When ``ignore_na=False`` (default), weights are based on absolute positions.
        For example, the weights of :math:`x_0` and :math:`x_2` used in calculating
        the final weighted average of [:math:`x_0`, None, :math:`x_2`] are
        :math:`(1-\alpha)^2` and :math:`1` if ``adjust=True``, and
        :math:`(1-\alpha)^2` and :math:`\alpha` if ``adjust=False``.
  
      - When ``ignore_na=True``, weights are based
        on relative positions. For example, the weights of :math:`x_0` and :math:`x_2`
        used in calculating the final weighted average of
        [:math:`x_0`, None, :math:`x_2`] are :math:`1-\alpha` and :math:`1` if
        ``adjust=True``, and :math:`1-\alpha` and :math:`\alpha` if ``adjust=False``.
  
  axis : {0, 1}, default 0
      If ``0`` or ``'index'``, calculate across the rows.
  
      If ``1`` or ``'columns'``, calculate across the columns.
  
      For `Series` this parameter is unused and defaults to 0.
  
  times : np.ndarray, Series, default None
  
      Only applicable to ``mean()``.
  
      Times corresponding to the observations. Must be monotonically increasing and
      ``datetime64[ns]`` dtype.
  
      If 1-D array like, a sequence with the same shape as the observations.
  
  method : str {'single', 'table'}, default 'single'
      .. versionadded:: 1.4.0
  
      Execute the rolling operation per single column or row (``'single'``)
      or over the entire object (``'table'``).
  
      This argument is only implemented when specifying ``engine='numba'``
      in the method call.
  
      Only applicable to ``mean()``
  
  Returns
  -------
  pandas.api.typing.ExponentialMovingWindow
  
  See Also
  --------
  rolling : Provides rolling window calculations.
  expanding : Provides expanding transformations.
  
  Notes
  -----
  See :ref:`Windowing Operations <window.exponentially_weighted>`
  for further usage details and examples.
  
  Examples
  --------
  >>> df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]})
  >>> df
       B
  0  0.0
  1  1.0
  2  2.0
  3  NaN
  4  4.0
  
  >>> df.ewm(com=0.5).mean()
            B
  0  0.000000
  1  0.750000
  2  1.615385
  3  1.615385
  4  3.670213
  >>> df.ewm(alpha=2 / 3).mean()
            B
  0  0.000000
  1  0.750000
  2  1.615385
  3  1.615385
  4  3.670213
  
  **adjust**
  
  >>> df.ewm(com=0.5, adjust=True).mean()
            B
  0  0.000000
  1  0.750000
  2  1.615385
  3  1.615385
  4  3.670213
  >>> df.ewm(com=0.5, adjust=False).mean()
            B
  0  0.000000
  1  0.666667
  2  1.555556
  3  1.555556
  4  3.650794
  
  **ignore_na**
  
  >>> df.ewm(com=0.5, ignore_na=True).mean()
            B
  0  0.000000
  1  0.750000
  2  1.615385
  3  1.615385
  4  3.225000
  >>> df.ewm(com=0.5, ignore_na=False).mean()
            B
  0  0.000000
  1  0.750000
  2  1.615385
  3  1.615385
  4  3.670213
  
  **times**
  
  Exponentially weighted mean with weights calculated with a timedelta ``halflife``
  relative to ``times``.
  
  >>> times = ['2020-01-01', '2020-01-03', '2020-01-10', '2020-01-15', '2020-01-17']
  >>> df.ewm(halflife='4 days', times=pd.DatetimeIndex(times)).mean()
            B
  0  0.000000
  1  0.585786
  2  1.523889
  3  1.523889
  4  3.233686
code: def var(self, bias: bool = False, numeric_only: bool = False):
      window_func = window_aggregations.ewmcov
      wfunc = partial(
          window_func,
          com=self._com,
          adjust=self.adjust,
          ignore_na=self.ignore_na,
          bias=bias,
      )
  
      def var_func(values, begin, end, min_periods):
          return wfunc(values, begin, end, min_periods, values)
  
      return self._apply(
          var_func, name="var", numeric_only=numeric_only
      )
  
imports: from __future__ import annotations
  import datetime
  from functools import partial
  from textwrap import dedent
  from typing import TYPE_CHECKING
  import numpy
  from pandas._libs.tslibs import Timedelta
  import pandas._libs.window.aggregations
  from pandas.util._decorators import doc
  from pandas.core.dtypes.common import is_datetime64_dtype, is_numeric_dtype
  from pandas.core.dtypes.dtypes import DatetimeTZDtype
  from pandas.core.dtypes.generic import ABCSeries
  from pandas.core.dtypes.missing import isna
  from pandas.core import common
  from pandas.core.arrays.datetimelike import dtype_to_unit
  from pandas.core.indexers.objects import BaseIndexer, ExponentialMovingWindowIndexer, GroupbyIndexer
  from pandas.core.util.numba_ import get_jit_arguments, maybe_use_numba
  from pandas.core.window.common import zsqrt
  from pandas.core.window.doc import _shared_docs, create_section_header, kwargs_numeric_only, numba_notes, template_header, template_returns, template_see_also, window_agg_numba_parameters
  from pandas.core.window.numba_ import generate_numba_ewm_func, generate_numba_ewm_table_func
  from pandas.core.window.online import EWMMeanState, generate_online_numba_ewma_func
  from pandas.core.window.rolling import BaseWindow, BaseWindowGroupby
label_desc: Use image node_id 9 for calling the ExponentialMovingWindow obj's underlying member method code with example usage: obj.var(bias, numeric_only) and returns: self, wfunc