PyGMT: Comparing elevation of two rasters

Hello again! I have two rasters of the same extent, each with one band for elevation. Raster A has elevation ranging from 0-200 representing depth and raster B has elevation ranging from 1-16 representing categories. I would like to be able to determine which elevations from raster A fall within each of the 16 categories. I’d ultimately like to be able to create a dataframe that holds the matched values. Is there a way to accomplish this through PyGMT?