class_docstr: Wrapper class for estimators from the causalml library.
  
  Supports additional parameters as listed below. For specific
  parameters of each estimator, refer to the CausalML docs.
class_docstr_tok: ["Wrapper","class","for","estimators","from","the","causalml","library",".","Supports","additional","parameters","as","listed","below",".","For","specific","parameters","of","each","estimator",",","refer","to","the","CausalML","docs","."]
docstr: data: dataframe containing the data on which treatment effect is to be estimated.
  treatment_value: value of the treatment variable for which the effect is to be estimated.
  control_value: value of the treatment variable that denotes its absence (usually 0)
  target_units: The units for which the treatment effect should be estimated.
               It can be a DataFrame that contains values of the effect_modifiers and effect will be estimated only for this new data.
               It can also be a lambda function that can be used as an index for the data (pandas DataFrame) to select the required rows.
docstr_tok: ["data",":","dataframe","containing","the","data","on","which","treatment","effect","is","to","be","estimated",".","treatment_value",":","value","of","the","treatment","variable","for","which","the","effect","is","to","be","estimated",".","control_value",":","value","of","the","treatment","variable","that","denotes","its","absence","(","usually","0",")","target_units",":","The","units","for","which","the","treatment","effect","should","be","estimated",".","It","can","be","a","DataFrame","that","contains","values","of","the","effect_modifiers","and","effect","will","be","estimated","only","for","this","new","data",".","It","can","also","be","a","lambda","function","that","can","be","used","as","an","index","for","the","data","(","pandas","DataFrame",")","to","select","the","required","rows","."]
code: def estimate_effect(
      self,
      data: pd.DataFrame,
      treatment_value: Any = 1,
      control_value: Any = 0,
      target_units=None,
      **_,
  ):
      """
      data: dataframe containing the data on which treatment effect is to be estimated.
      treatment_value: value of the treatment variable for which the effect is to be estimated.
      control_value: value of the treatment variable that denotes its absence (usually 0)
      target_units: The units for which the treatment effect should be estimated.
                   It can be a DataFrame that contains values of the effect_modifiers and effect will be estimated only for this new data.
                   It can also be a lambda function that can be used as an index for the data (pandas DataFrame) to select the required rows.
      """
      self._target_units = target_units
      self._treatment_value = treatment_value
      self._control_value = control_value
      X_names = (
          self._observed_common_causes_names
          + self._effect_modifier_names
      )
  
      # Both the outcome and the treatment have to be 1D arrays according to the CausalML API
      y_name = self._target_estimand.outcome_variable[0]
      treatment_name = self._target_estimand.treatment_variable[
          0
      ]  # As we have only one treatment variable
      # We want to pass 'v0' rather than ['v0'] to prevent a shape mismatch
  
      func_args = {
          "X": data[X_names],
          "y": data[y_name],
          "treatment": data[treatment_name],
      }
  
      arg_names = inspect.getfullargspec(self.estimator.estimate_ate)[0]
      matched_args = {
          arg: func_args[arg]
          for arg in func_args.keys()
          if arg in arg_names
      }
      self.logger.debug(matched_args)
      value_tuple = self.estimator.estimate_ate(**matched_args)
  
      # For CATEs
      arg_names = inspect.getfullargspec(self.estimator.fit_predict)[0]
      matched_args = {
          arg: func_args[arg]
          for arg in func_args.keys()
          if arg in arg_names
      }
      cate_estimates = self.estimator.fit_predict(**matched_args)
  
      estimate = CausalEstimate(
          data=data,
          treatment_name=treatment_name,
          outcome_name=self._target_estimand.outcome_variable[0],
          estimate=value_tuple[0],
          control_value=control_value,
          treatment_value=treatment_value,
          target_estimand=self._target_estimand,
          realized_estimand_expr=self.symbolic_estimator,
          cate_estimates=cate_estimates,
          effect_intervals=(value_tuple[1], value_tuple[2]),
          _estimator_object=self.estimator,
      )
  
      estimate.add_estimator(self)
      return estimate
  
file_path: dowhy/dowhy/causal_estimators/causalml.py
imports: import inspect
  import logging
  from importlib import import_module
  from typing import Any, List, Optional, Protocol, Union
  from warnings import warn
  import pandas
  from dowhy.causal_estimator import CausalEstimate, CausalEstimator
  from dowhy.causal_identifier import IdentifiedEstimand
label_desc: Use image node_id 4 for calling the Causalml obj's underlying member method code with example usage: obj.estimate_effect(data, treatment_value, control_value, target_units) and returns: estimate