docstr: Instantiate a FolkTables dataset.
  
  Parameters
  ----------
  variant : str
      The variant of the dataset to load.
  split_type : str, optional
      The type of data split to use. Defaults to "month".
  splits : dict[str, list[Any]], optional
      The proportions of data to use for each split. Defaults to DEFAULT_SPLIT.
  path : Path, optional
      The path to the dataset directory. Defaults to aequitas/datasets/FolkTables.
  seed : int, optional
      Sampling seed for the dataset. Only required in "split_type" == "random".
      Defaults to 42.
  extension : str, optional
      Extension type of the dataset files. Defaults to "parquet".
docstr_tok: ["Instantiate","a","FolkTables","dataset",".","Parameters","--","--","--","--","--","variant",":","str","The","variant","of","the","dataset","to","load",".","split_type",":","str",",","optional","The","type","of","data","split","to","use",".","Defaults","to","``","month","''",".","splits",":","dict","[","str",",","list","[","Any","]","]",",","optional","The","proportions","of","data","to","use","for","each","split",".","Defaults","to","DEFAULT_SPLIT",".","path",":","Path",",","optional","The","path","to","the","dataset","directory",".","Defaults","to","aequitas\/datasets\/FolkTables",".","seed",":","int",",","optional","Sampling","seed","for","the","dataset",".","Only","required","in","``","split_type","''","==","``","random","''",".","Defaults","to","42.","extension",":","str",",","optional","Extension","type","of","the","dataset","files",".","Defaults","to","``","parquet","''","."]
code: def __init__(
      self,
      variant: str,
      split_type: str = "predefined",
      splits: dict[str, list[Any]] = DEFAULT_SPLIT,
      path: Union[str, Path] = DEFAULT_PATH,
      seed: int = 42,
      extension: str = "parquet",
      target_feature: Optional[str] = None,
      sensitive_feature: Optional[str] = None,
  ):
      """Instantiate a FolkTables dataset.
  
      Parameters
      ----------
      variant : str
          The variant of the dataset to load.
      split_type : str, optional
          The type of data split to use. Defaults to "month".
      splits : dict[str, list[Any]], optional
          The proportions of data to use for each split. Defaults to DEFAULT_SPLIT.
      path : Path, optional
          The path to the dataset directory. Defaults to aequitas/datasets/FolkTables.
      seed : int, optional
          Sampling seed for the dataset. Only required in "split_type" == "random".
          Defaults to 42.
      extension : str, optional
          Extension type of the dataset files. Defaults to "parquet".
      """
      super().__init__()
  
      self.logger = create_logger("datasets.FolkTables")
      self.logger.info("Instantiating a FolkTables dataset.")
  
      # Validate inputs:
      if variant not in VARIANTS:
          raise ValueError(
              f"Invalid variant value. Try one of: {VARIANTS}"
          )
      else:
          self.variant = variant
          self.logger.debug(f"Variant: {self.variant}")
      if url(path) or path.exists():
          self._download = False
      else:
          # Download if path does not exist and data not in path
          self._download = True
      self.path = path
  
      if split_type not in SPLIT_TYPES:
          raise ValueError(
              f"Invalid split_type value. Try one of: {SPLIT_TYPES}"
          )
      else:
          self.split_type = split_type
          self.splits = splits
          self._validate_splits()
          self.logger.debug("Splits successfully validated.")
      self.extension = extension
      self.seed = seed
      self._data: LabeledFrame = None
      self._train: LabeledFrame = None
      self._validation: LabeledFrame = None
      self._test: LabeledFrame = None
      self.target_feature = (
          TARGET_FEATURES[self.variant]
          if target_feature is None
          else target_feature
      )
      self.sensitive_feature = (
          SENSITIVE_FEATURE
          if sensitive_feature is None
          else sensitive_feature
      )
      self._indexes = None
  
file_path: aequitas/src/aequitas/fairflow/datasets/folktables.py
imports: import os
  from pathlib import Path
  from typing import Any, Optional, Union
  import pandas
  import requests
  from validators import url
  from ..utils import LabeledFrame, create_logger
  from .dataset import Dataset
label_desc: Use image node_id 1 to create a new FolkTables object from inherited base classes: Dataset with example: obj = FolkTables(variant, split_type, splits, path, seed, extension, target_feature, sensitive_feature)