class_docstr: The ProjectReport class allows to generate general information about a
  Data Science project.
  It analyzes the data and the model used in order to provide interesting
  insights that can be shared with non technical person.
  
  Parameters
  ----------
  explainer : shapash.explainer.smart_explainer.SmartExplainer
      A shapash SmartExplainer object that has already be compiled.
  project_info_file : str
      Path to the yml file containing information about the project (author, description, ...).
  config : dict, optional
      Contains configuration options for the report.
  
  Attributes
  ----------
  explainer : shapash.explainer.smart_explainer.SmartExplainer
       A shapash SmartExplainer object that has already be compiled.
  metadata : dict
      Information about the project (author, description, ...).
  x_train : pd.DataFrame
      DataFrame used for training the model.
  y_test : pd.Series or pd.DataFrame
      Series of labels in the train set.
  y_test : pd.Series or pd.DataFrame
      Series of labels in the test set.
  config : dict, optional
      Configuration options for the report.
class_docstr_tok: ["The","ProjectReport","class","allows","to","generate","general","information","about","a","Data","Science","project",".","It","analyzes","the","data","and","the","model","used","in","order","to","provide","interesting","insights","that","can","be","shared","with","non","technical","person",".","Parameters","--","--","--","--","--","explainer",":","shapash.explainer.smart_explainer.SmartExplainer","A","shapash","SmartExplainer","object","that","has","already","be","compiled",".","project_info_file",":","str","Path","to","the","yml","file","containing","information","about","the","project","(","author",",","description",",","...",")",".","config",":","dict",",","optional","Contains","configuration","options","for","the","report",".","Attributes","--","--","--","--","--","explainer",":","shapash.explainer.smart_explainer.SmartExplainer","A","shapash","SmartExplainer","object","that","has","already","be","compiled",".","metadata",":","dict","Information","about","the","project","(","author",",","description",",","...",")",".","x_train",":","pd.DataFrame","DataFrame","used","for","training","the","model",".","y_test",":","pd.Series","or","pd.DataFrame","Series","of","labels","in","the","train","set",".","y_test",":","pd.Series","or","pd.DataFrame","Series","of","labels","in","the","test","set",".","config",":","dict",",","optional","Configuration","options","for","the","report","."]
docstr: Creates a DataFrame that contains train and test dataset with the column 'data_train_test'
  allowing to distinguish the values.
  
  Parameters
  ----------
  test : pd.DataFrame, optional
      test dataframe
  train : pd.DataFrame, optional
      train dataframe
  
  Returns
  -------
  pd.DataFrame
      The concatenation of train and test as a dataframe containing train and test values with
      a new 'data_train_test' column allowing to distinguish the values.
docstr_tok: ["Creates","a","DataFrame","that","contains","train","and","test","dataset","with","the","column","'data_train_test'","allowing","to","distinguish","the","values",".","Parameters","--","--","--","--","--","test",":","pd.DataFrame",",","optional","test","dataframe","train",":","pd.DataFrame",",","optional","train","dataframe","Returns","--","--","--","-","pd.DataFrame","The","concatenation","of","train","and","test","as","a","dataframe","containing","train","and","test","values","with","a","new","'data_train_test","'","column","allowing","to","distinguish","the","values","."]
code: def _create_train_test_df(
      test: Optional[pd.DataFrame], train: Optional[pd.DataFrame]
  ) -> Union[pd.DataFrame, None]:
      """
      Creates a DataFrame that contains train and test dataset with the column 'data_train_test'
      allowing to distinguish the values.
  
      Parameters
      ----------
      test : pd.DataFrame, optional
          test dataframe
      train : pd.DataFrame, optional
          train dataframe
  
      Returns
      -------
      pd.DataFrame
          The concatenation of train and test as a dataframe containing train and test values with
          a new 'data_train_test' column allowing to distinguish the values.
      """
      if (test is not None and "data_train_test" in test.columns) or (
          train is not None and "data_train_test" in train.columns
      ):
          raise ValueError(
              '"data_train_test" column must be renamed as it is used in ProjectReport'
          )
      if test is None and train is None:
          return None
      return pd.concat(
          [
              test.assign(data_train_test="test")
              if test is not None
              else None,
              train.assign(data_train_test="train")
              if train is not None
              else None,
          ]
      ).reset_index(drop=True)
  
imports: from typing import Optional, Union, Tuple
  import logging
  import sys
  import os
  from numbers import Number
  from datetime import date
  import jinja2
  import pandas
  import numpy
  import plotly
  from shapash.utils.transform import inverse_transform, apply_postprocessing, handle_categorical_missing
  from shapash import SmartExplainer
  from shapash.utils.io import load_yml
  from shapash.utils.utils import get_project_root, truncate_str
  from shapash.report.visualisation import print_md, print_html, print_css_style, convert_fig_to_html, print_javascript_misc
  from shapash.report.data_analysis import perform_global_dataframe_analysis, perform_univariate_dataframe_analysis
  from shapash.report.plots import generate_fig_univariate, generate_confusion_matrix_plot
  from shapash.report.common import series_dtype, get_callable, compute_col_types, VarType, display_value
  from shapash.webapp.utils.utils import round_to_k
label_desc: Use image node_id 3 for calling the ProjectReport obj's underlying member method code with example usage: obj._create_train_test_df(test, train) and returns: pd, None