docstr: Generate datetime feature(s) for each record.
  
  :param features: str or list, states which feature(s) will be generated. If the value
         is set to be a str, it should be one of "auto" or "all". For "auto", a subset
         of datetime features will be generated under the consideration of the sampling
         frequency of your data. For "all", the whole set of datetime features will be
         generated. If the value is set to be a list, the list should contain the features
         you want to generate. A table of all datatime features and their description is
         listed below. The value defaults to "auto".
  :param one_hot_features: list, states which feature(s) will be generated as one-hot-encoded
         feature. The value defaults to None, which means no features will be generated with               one-hot-encoded.
  
  | "MINUTE": The minute of the time stamp.
  | "DAY": The day of the time stamp.
  | "DAYOFYEAR": The ordinal day of the year of the time stamp.
  | "HOUR": The hour of the time stamp.
  | "WEEKDAY": The day of the week of the time stamp, Monday=0, Sunday=6.
  | "WEEKOFYEAR": The ordinal week of the year of the time stamp.
  | "MONTH": The month of the time stamp.
  | "YEAR": The year of the time stamp.
  | "IS_AWAKE": Bool value indicating whether it belongs to awake hours for the time stamp,
  | True for hours between 6A.M. and 1A.M.
  | "IS_BUSY_HOURS": Bool value indicating whether it belongs to busy hours for the time
  | stamp, True for hours between 7A.M. and 10A.M. and hours between 4P.M. and 8P.M.
  | "IS_WEEKEND": Bool value indicating whether it belongs to weekends for the time stamp,
  | True for Saturdays and Sundays.
  
  :return: the tsdataset instance.
docstr_tok: ["Generate","datetime","feature","(","s",")","for","each","record",".",":","param","features",":","str","or","list",",","states","which","feature","(","s",")","will","be","generated",".","If","the","value","is","set","to","be","a","str",",","it","should","be","one","of","``","auto","''","or","``","all","''",".","For","``","auto","''",",","a","subset","of","datetime","features","will","be","generated","under","the","consideration","of","the","sampling","frequency","of","your","data",".","For","``","all","''",",","the","whole","set","of","datetime","features","will","be","generated",".","If","the","value","is","set","to","be","a","list",",","the","list","should","contain","the","features","you","want","to","generate",".","A","table","of","all","datatime","features","and","their","description","is","listed","below",".","The","value","defaults","to","``","auto","''",".",":","param","one_hot_features",":","list",",","states","which","feature","(","s",")","will","be","generated","as","one-hot-encoded","feature",".","The","value","defaults","to","None",",","which","means","no","features","will","be","generated","with","one-hot-encoded",".","|","``","MINUTE","''",":","The","minute","of","the","time","stamp",".","|","``","DAY","''",":","The","day","of","the","time","stamp",".","|","``","DAYOFYEAR","''",":","The","ordinal","day","of","the","year","of","the","time","stamp",".","|","``","HOUR","''",":","The","hour","of","the","time","stamp",".","|","``","WEEKDAY","''",":","The","day","of","the","week","of","the","time","stamp",",","Monday=0",",","Sunday=6",".","|","``","WEEKOFYEAR","''",":","The","ordinal","week","of","the","year","of","the","time","stamp",".","|","``","MONTH","''",":","The","month","of","the","time","stamp",".","|","``","YEAR","''",":","The","year","of","the","time","stamp",".","|","``","IS_AWAKE","''",":","Bool","value","indicating","whether","it","belongs","to","awake","hours","for","the","time","stamp",",","|","True","for","hours","between","6A.M",".","and","1A.M",".","|","``","IS_BUSY_HOURS","''",":","Bool","value","indicating","whether","it","belongs","to","busy","hours","for","the","time","|","stamp",",","True","for","hours","between","7A.M",".","and","10A.M",".","and","hours","between","4P.M",".","and","8P.M",".","|","``","IS_WEEKEND","''",":","Bool","value","indicating","whether","it","belongs","to","weekends","for","the","time","stamp",",","|","True","for","Saturdays","and","Sundays",".",":","return",":","the","tsdataset","instance","."]
code: def gen_dt_feature(self, features="auto", one_hot_features=None):
      """
          Generate datetime feature(s) for each record.
  
          :param features: str or list, states which feature(s) will be generated. If the value
                 is set to be a str, it should be one of "auto" or "all". For "auto", a subset
                 of datetime features will be generated under the consideration of the sampling
                 frequency of your data. For "all", the whole set of datetime features will be
                 generated. If the value is set to be a list, the list should contain the features
                 you want to generate. A table of all datatime features and their description is
                 listed below. The value defaults to "auto".
          :param one_hot_features: list, states which feature(s) will be generated as one-hot-encoded
                 feature. The value defaults to None, which means no features will be generated with\
                 one-hot-encoded.
  
          | "MINUTE": The minute of the time stamp.
          | "DAY": The day of the time stamp.
          | "DAYOFYEAR": The ordinal day of the year of the time stamp.
          | "HOUR": The hour of the time stamp.
          | "WEEKDAY": The day of the week of the time stamp, Monday=0, Sunday=6.
          | "WEEKOFYEAR": The ordinal week of the year of the time stamp.
          | "MONTH": The month of the time stamp.
          | "YEAR": The year of the time stamp.
          | "IS_AWAKE": Bool value indicating whether it belongs to awake hours for the time stamp,
          | True for hours between 6A.M. and 1A.M.
          | "IS_BUSY_HOURS": Bool value indicating whether it belongs to busy hours for the time
          | stamp, True for hours between 7A.M. and 10A.M. and hours between 4P.M. and 8P.M.
          | "IS_WEEKEND": Bool value indicating whether it belongs to weekends for the time stamp,
          | True for Saturdays and Sundays.
  
          :return: the tsdataset instance.
          """
      if not self.deploy_mode:
          from bigdl.nano.utils.common import invalidInputError
  
          invalidInputError(
              self._is_pd_datetime,
              "The time series data does not have a Pandas datetime format"
              "(you can use pandas.to_datetime to convert a string into"
              " a datetime format.)",
          )
      features_generated = []
      self.df = generate_dt_features(
          input_df=self.df,
          dt_col=self.dt_col,
          features=features,
          one_hot_features=one_hot_features,
          freq=self._freq,
          features_generated=features_generated,
      )
      self.feature_col += features_generated
      return self
  
imports: import pandas
  import numpy
  import functools
  import logging
  from bigdl.chronos.data.utils.feature import generate_dt_features, generate_global_features
  from bigdl.chronos.data.utils.impute import impute_timeseries_dataframe
  from bigdl.chronos.data.utils.deduplicate import deduplicate_timeseries_dataframe
  from bigdl.chronos.data.utils.roll import roll_timeseries_dataframe
  from bigdl.chronos.data.utils.time_feature import time_features, gen_time_enc_arr
  from bigdl.chronos.data.utils.scale import unscale_timeseries_numpy, scale_timeseries_numpy
  from bigdl.chronos.data.utils.resample import resample_timeseries_dataframe
  from bigdl.chronos.data.utils.split import split_timeseries_dataframe
  from bigdl.chronos.data.utils.cycle_detection import cycle_length_est
  from bigdl.chronos.data.utils.quality_inspection import quality_check_timeseries_dataframe, _abnormal_value_repair
  from bigdl.chronos.data.utils.utils import _to_list, _check_type, _check_col_within, _check_col_no_na, _check_is_aligned, _check_dt_is_sorted
label_desc: Use image node_id 9 for calling the TSDataset obj's underlying member method code with example usage: obj.gen_dt_feature(features, one_hot_features) and returns: self