extract_position_by_value

extract_position_by_value(df: pd.DataFrame, value: object) list[tuple[object, object]][source]

Extract index and column where the dataframe has the value value.

Parameters
  • df (pd.DataFrame) – Dataframe the columns and indices should be extracted from.

  • value (object) – Value to look for in df

Returns

List of indices and column where df has the value value

Return type

list[tuple[object, object]]