exists_in_csv_old

ssapy.io.exists_in_csv_old(csv_file, column, number, sep='\t')[source][source]

Check if a specific value exists in a given column of a CSV file.

This function reads a CSV file and checks whether the specified number exists in the specified column. If the file cannot be opened or read, the function returns False.

Parameters:
  • csv_file (str) – The path to the CSV file.

  • column (str) – The name of the column to search in.

  • number (int or str) – The value to search for in the specified column.

  • sep (str, optional) – The delimiter used in the CSV file. Defaults to ‘ ‘.

Returns:

  • True if the value exists in the specified column.

  • False if the value does not exist or if the file cannot be opened.

Return type:

bool