ImageUtils

ImageUtils.isImage(df, column)[source]

Returns True if the column contains images

Parameters:
  • df (DataFrame) – The DataFrame to be processed
  • column (str) – The name of the column being inspected
Returns:

True if the colum is an image column

Return type:

bool

ImageUtils.readFromPaths(df, pathCol, imageCol='image')[source]

Reads images from a column of filenames

Parameters:
  • df (DataFrame) – The DataFrame to be processed
  • pathCol (str) – The name of the column containing filenames
  • imageCol (str) – The name of the added column of images
Returns:

The dataframe with loaded images

Return type:

df

ImageUtils.readFromStrings(df, bytesCol, imageCol='image', dropPrefix=False)[source]

Reads images from a column of filenames

Parameters:
  • df (DataFrame) – The DataFrame to be processed
  • pathCol (str) – The name of the column containing filenames
  • imageCol (str) – The name of the added column of images
Returns:

The dataframe with loaded images

Return type:

df