class_docstr: Time Series tab: Statistics
class_docstr_tok: ["Time","Series","tab",":","Statistics"]
code: def __init__(
      self, name: str, result: Dict[str, Any], ser: pd.Series
  ) -> None:
      _ = (name, ser)
      stats = pd.Series(
          {
              name: result[fun]
              for name, fun in {
                  "Mean": "mean",
                  "Variance": "var",
                  "Standard deviation": "std",
                  "Median": "median",
                  "Median absolute deviation": "mad",
                  "Coefficient of variation": "cov",
                  "Minimum": "minimum",
                  "25%": "q25",
                  "50%": "q50",
                  "75%": "q75",
                  "Maximum": "maximum",
                  "Interquartile range": "iqr",
                  "Kurtosis": "kurtosis",
                  "Skewness": "skew",
              }.items()
          },
          name="Value",
      )
      self.stats = pd.DataFrame(stats)
  
      series_tests = {}
      for tname in [
          "levene_constant_variance",
          "ljungbox_autocorrelation",
          "jarque_bera_normality",
          "omnibus_normality",
          "adfuller_stationarity",
          "kpss_stationarity",
      ]:
          tr = result.get(tname, None)
          if not tr:
              continue
          series_tests[tr.test] = {
              "Null Hypothesis": tr.null_hypothesis,
              "Reject": "Yes" if tr.reject_null_hypothesis else "No",
              "pvalue": f"{tr.p_value:.3f}",
              "Confidence": f"{tr.confidence_level:.2f}",
          }
      self.tests = pd.DataFrame(series_tests).T.rename_axis(
          index="Test"
      )
  
imports: from typing import Dict, Any, Optional
  from pprint import pformat
  import pandas
  import yaml
  import tslumen
  from tslumen.misc import lazyproperty
  from tslumen.scheduling import Scheduler
  from tslumen.profile import BundledResult
  from tslumen import jinja_utils
  from tslumen.report.html.base import HtmlBlock
  from tslumen.plot.static import TS, TSStack, Distribution, BoxPlot, LagCorrelation, LagMatrix, Radar, Heatmap, ScatterMatrix, GrangerMatrix, GrangerGraph
label_desc: Use image node_id 1 to create a new TabTSStatistics object from inherited base classes: HtmlBlock with example: obj = TabTSStatistics(name, result, ser)