code: def extract_date(f, c):
      r"""Extract date into its components: year, month, day, dayofweek.
  
      Parameters
      ----------
      f : pandas.DataFrame
          Dataframe containing the date column ``c``.
      c : str
          Name of the date column in the dataframe ``f``.
  
      Returns
      -------
      date_features : pandas.DataFrame
          The dataframe containing the date features.
      """
  
      fc = pd.to_datetime(f[c])
      date_features = pd.DataFrame()
      try:
          fyear = pd.Series(fc.dt.year, name="year")
          fmonth = pd.Series(fc.dt.month, name="month")
          fday = pd.Series(fc.dt.day, name="day")
          fdow = pd.Series(fc.dt.dayofweek, name="day_of_week")
          frames = [fyear, fmonth, fday, fdow]
          date_features = pd.concat(frames, axis=1)
      except:
          logger.info(
              "Could not extract date information from %s column", c
          )
      return date_features
  
imports: from alphapy.calendrical import biz_day_month
  from alphapy.calendrical import biz_day_week
  from alphapy.globals import NULLTEXT
  from alphapy.globals import BSEP, PSEP, USEP
  from alphapy.variables import vexec
  import itertools
  import logging
  import math
  import numpy
  import pandas
label_desc: Use image node_id 15 for calling a global function with example usage: extract_date(f, c) and returns: date_features