code: def transform(self, X):
      column = self._old_column
  
      if "year" in self._transforms:
          new_column = column + "_Year"
          X[new_column] = X[column].dt.year
  
      if "month" in self._transforms:
          new_column = column + "_Month"
          X[new_column] = X[column].dt.month
  
      if "day" in self._transforms:
          new_column = column + "_Day"
          X[new_column] = X[column].dt.day
  
      if "weekday" in self._transforms:
          new_column = column + "_WeekDay"
          X[new_column] = X[column].dt.weekday
  
      if "dayofyear" in self._transforms:
          new_column = column + "_DayOfYear"
          X[new_column] = X[column].dt.dayofyear
  
      if "hour" in self._transforms:
          new_column = column + "_Hour"
          X[new_column] = X[column].dt.hour
  
      if "days_diff" in self._transforms:
          new_column = column + "_Days_Diff_To_Min"
          X[new_column] = (X[column] - self._min_datetime).dt.days
  
      X.drop(column, axis=1, inplace=True)
      return X
  
file_path: mljar-supervised/supervised/preprocessing/datetime_transformer.py
imports: import datetime
  import json
  import numpy
  import pandas
label_desc: Use image node_id 3 for calling the DateTimeTransformer obj's underlying member method code with example usage: obj.transform(X) and returns: X