class_docstr: Generate a profile report from a Dataset stored as a pandas `DataFrame`.
  
  Used as is, it will output its content as an HTML report in a Jupyter notebook.
class_docstr_tok: ["Generate","a","profile","report","from","a","Dataset","stored","as","a","pandas","`","DataFrame","`",".","Used","as","is",",","it","will","output","its","content","as","an","HTML","report","in","a","Jupyter","notebook","."]
docstr: Generate a ProfileReport based on a pandas or spark.sql DataFrame
  
  Config processing order (in case of duplicate entries, entries later in the order are retained):
  - config presets (e.g. `config_file`, `minimal` arguments)
  - config groups (e.g. `explorative` and `sensitive` arguments)
  - custom settings (e.g. `config` argument)
  - custom settings **kwargs (e.g. `title`)
  
  Args:
      df: a pandas or spark.sql DataFrame
      minimal: minimal mode is a default configuration with minimal computation
      ts_mode: activates time-series analysis for all the numerical variables from the dataset. Only available for pd.DataFrame
      sort_by: ignored if ts_mode=False. Order the dataset by a provided column.
      sensitive: hides the values for categorical and text variables for report privacy
      config_file: a config file (.yml), mutually exclusive with `minimal`
      lazy: compute when needed
      sample: optional dict(name="Sample title", caption="Caption", data=pd.DataFrame())
      typeset: optional user typeset to use for type inference
      summarizer: optional user summarizer to generate custom summary output
      type_schema: optional dict containing pairs of `column name`: `type`
      **kwargs: other arguments, for valid arguments, check the default configuration file.
code: def __init__(
      self,
      df: Optional[Union[pd.DataFrame, sDataFrame]] = None,
      minimal: bool = False,
      tsmode: bool = False,
      sortby: Optional[str] = None,
      sensitive: bool = False,
      explorative: bool = False,
      dark_mode: bool = False,
      orange_mode: bool = False,
      sample: Optional[dict] = None,
      config_file: Optional[Union[Path, str]] = None,
      lazy: bool = True,
      typeset: Optional[VisionsTypeset] = None,
      summarizer: Optional[BaseSummarizer] = None,
      config: Optional[Settings] = None,
      type_schema: Optional[dict] = None,
      **kwargs,
  ):
      """Generate a ProfileReport based on a pandas or spark.sql DataFrame
  
      Config processing order (in case of duplicate entries, entries later in the order are retained):
      - config presets (e.g. `config_file`, `minimal` arguments)
      - config groups (e.g. `explorative` and `sensitive` arguments)
      - custom settings (e.g. `config` argument)
      - custom settings **kwargs (e.g. `title`)
  
      Args:
          df: a pandas or spark.sql DataFrame
          minimal: minimal mode is a default configuration with minimal computation
          ts_mode: activates time-series analysis for all the numerical variables from the dataset. Only available for pd.DataFrame
          sort_by: ignored if ts_mode=False. Order the dataset by a provided column.
          sensitive: hides the values for categorical and text variables for report privacy
          config_file: a config file (.yml), mutually exclusive with `minimal`
          lazy: compute when needed
          sample: optional dict(name="Sample title", caption="Caption", data=pd.DataFrame())
          typeset: optional user typeset to use for type inference
          summarizer: optional user summarizer to generate custom summary output
          type_schema: optional dict containing pairs of `column name`: `type`
          **kwargs: other arguments, for valid arguments, check the default configuration file.
      """
  
      self.__validate_inputs(df, minimal, tsmode, config_file, lazy)
  
      if config_file or minimal:
          if not config_file:
              config_file = get_config("config_minimal.yaml")
  
          report_config = Settings().from_file(config_file)
      elif config is not None:
          report_config = config
      else:
          if isinstance(df, pd.DataFrame):
              report_config = Settings()
          else:
              report_config = SparkSettings()
  
      groups = [
          (explorative, "explorative"),
          (sensitive, "sensitive"),
          (dark_mode, "dark_mode"),
          (orange_mode, "orange_mode"),
      ]
  
      if any(condition for condition, _ in groups):
          cfg = Settings()
          for condition, key in groups:
              if condition:
                  cfg = cfg.update(Config.get_arg_groups(key))
          report_config = cfg.update(
              report_config.dict(exclude_defaults=True)
          )
  
      if len(kwargs) > 0:
          shorthands, kwargs = Config.shorthands(kwargs)
          report_config = (
              Settings()
              .update(shorthands)
              .update(report_config.dict(exclude_defaults=True))
          )
  
      if kwargs:
          report_config = report_config.update(kwargs)
  
      report_config.vars.timeseries.active = tsmode
      if tsmode and sortby:
          report_config.vars.timeseries.sortby = sortby
  
      self.df = self.__initialize_dataframe(df, report_config)
      self.config = report_config
      self._df_hash = None
      self._sample = sample
      self._type_schema = type_schema
      self._typeset = typeset
      self._summarizer = summarizer
  
      if not lazy:
          # Trigger building the report structure
          _ = self.report
  
imports: import copy
  import json
  import warnings
  from pathlib import Path
  from typing import Any, Optional, Union
  from dataclasses import asdict, is_dataclass
  import numpy
  import pandas
  from tqdm.auto import tqdm
  from typeguard import typechecked
  from visions import VisionsTypeset
  from ydata_profiling.config import Config, Settings, SparkSettings
  from ydata_profiling.expectations_report import ExpectationsReport
  from ydata_profiling.model import BaseDescription
  from ydata_profiling.model.alerts import AlertType
  from ydata_profiling.model.describe import describe
  from ydata_profiling.model.sample import Sample
  from ydata_profiling.model.summarizer import BaseSummarizer, PandasProfilingSummarizer, format_summary, redact_summary
  from ydata_profiling.model.typeset import ProfilingTypeSet
  from ydata_profiling.report import get_report_structure
  from ydata_profiling.report.presentation.core import Root
  from ydata_profiling.report.presentation.flavours.html.templates import create_html_assets
  from ydata_profiling.serialize_report import SerializeReport
  from ydata_profiling.utils.dataframe import hash_dataframe
  from ydata_profiling.utils.paths import get_config
label_desc: Use image node_id 1 to create a new ProfileReport object from inherited base classes: SerializeReport, ExpectationsReport with example: obj = ProfileReport(df, minimal, tsmode, sortby, sensitive, explorative, dark_mode, orange_mode, sample, config_file, lazy, typeset, summarizer, config, type_schema)