docstr: Returns a frame of the total time taken per variable, event.
  Returns a pandas dataframe if pandas is installed. Otherwise, np.array.
docstr_tok: ["Returns","a","frame","of","the","total","time","taken","per","variable",",","event",".","Returns","a","pandas","dataframe","if","pandas","is","installed",".","Otherwise",",","np.array","."]
code: def get_time_df_summary(self):
      """
      Returns a frame of the total time taken per variable, event.
      Returns a pandas dataframe if pandas is installed. Otherwise, np.array.
      """
  
      if PANDAS_INSTALLED:
          dat = pd_Series(
              self.time_seconds.values(), index=self.time_seconds.keys()
          )
          agg = dat.groupby(level=[1, 3]).sum()
          df = pd_DataFrame(agg).reset_index()
          df.columns = ["Variable", "Event", "Seconds"]
          piv = df.pivot_table(
              values="Seconds", index="Variable", columns="Event"
          )
          return piv
      else:
          raise ValueError("Returning times as a frame requires pandas")
  
file_path: miceforest/miceforest/logger.py
imports: from .compat import pd_Series, pd_DataFrame, PANDAS_INSTALLED
  from datetime import datetime
  from typing import Dict, Any
label_desc: Use image node_id 6 for calling the Logger obj's underlying member method code with example usage: obj.get_time_df_summary() and returns: piv