code: def select_from_dataframe(
      df: pd.DataFrame,
      columns: t.Union[Hashable, t.List[Hashable], None] = None,
      ignore_columns: t.Union[Hashable, t.List[Hashable], None] = None,
  ) -> pd.DataFrame:
      """Filter DataFrame columns by given params.
  
      Parameters
      ----------
      df : pd.DataFrame
      columns : t.Union[Hashable, t.List[Hashable]] , default: None
          Column names to keep.
      ignore_columns : t.Union[Hashable, t.List[Hashable]] , default: None
          Column names to drop.
  
      Returns
      -------
      pandas.DataFrame
          returns horizontally filtered dataframe
  
      Raises
      ------
      DeepchecksValueError
          If some columns do not exist within provided dataframe;
          If 'columns' and 'ignore_columns' arguments are both not 'None'.
      """
      if columns is not None and ignore_columns is not None:
          raise DeepchecksValueError(
              'Cannot receive both parameters "columns" and "ignore", '
              "only one must be used at most"
          )
      elif columns is not None:
          columns = ensure_hashable_or_mutable_sequence(columns)
          validate_columns_exist(df, columns)
          return t.cast(pd.DataFrame, df[columns])
      elif ignore_columns is not None:
          ignore_columns = ensure_hashable_or_mutable_sequence(
              ignore_columns
          )
          validate_columns_exist(df, ignore_columns)
          return df.drop(labels=ignore_columns, axis="columns")
      else:
          return df
  
file_path: deepchecks/deepchecks/utils/dataframes.py
imports: import typing
  import numpy
  import pandas
  from pandas.core.dtypes.common import is_float_dtype, is_integer_dtype, is_numeric_dtype
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.utils.type_inference import infer_categorical_features
  from deepchecks.utils.typing import Hashable
  from deepchecks.utils.validation import ensure_hashable_or_mutable_sequence
label_desc: Use image node_id 7 for calling a global function with example usage: select_from_dataframe(df, columns, ignore_columns) and returns: t, df, df