docstr: Load the defined FolkTables dataset.
docstr_tok: ["Load","the","defined","FolkTables","dataset","."]
code: def load_data(self):
      """Load the defined FolkTables dataset."""
      self.logger.info("Loading data.")
      if self._download:
          self._download_data()
  
      if self.split_type == "predefined":
          path = []
          for split in ["train", "validation", "test"]:
              if isinstance(self.path, str):
                  path.append(
                      self.path
                      + f"/{self.variant}.{split}.{self.extension}"
                  )
              else:
                  path.append(
                      self.path
                      / f"{self.variant}.{split}.{self.extension}"
                  )
      else:
          path = self.path / f"{self.variant}.{self.extension}"
  
      if self.extension == "parquet":
          if self.split_type == "predefined":
              datasets = [pd.read_parquet(p) for p in path]
              self._indexes = [d.index for d in datasets]
              self.data = pd.concat(datasets)
          else:
              self.data = pd.read_parquet(path)
      else:
          if self.split_type == "predefined":
              datasets = [pd.read_csv(p) for p in path]
              self._indexes = [d.index for d in datasets]
              self.data = pd.concat(datasets)
          else:
              self.data = pd.read_csv(path)
      for col in CATEGORICAL_FEATURES:
          self.data[col] = self.data[col].astype("category")
      self.logger.debug("Data shape: {self.data.shape}.")
      self.logger.info("Data loaded successfully.")
  
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 3 for calling the FolkTables obj's underlying member method code with example usage: obj.load_data() without return types