I want to identify all the columns that contains only a specific pattern, which is 32 characters long hex code. So if I have the following DataFrame for example
Incident SLA Contributor Priority Last Group
-----------------------------------------------------------------------------------------------------------------------------
0000329edb523708f8079044db9619f0 DAP/IBM P2 3a03ba3a6f22f2c44484f5269f3ee425
3bb02e66db97a70cf8079044db961907 EUX/SD P4 102a3748dbee2200d4c17868bf9619b1
3bb02e66db97a70cf8079044db961907 fa863d3fdb1d3740205a328c7c961982 P4 102a3748dbee2200d4c17868bf9619b1
82cf9812dbd80098b6629c4adb96198d DAP/IBM P4 3a03ba3a6f22f2c44484f5269f3ee425
9e12a6c11b228c14de583150cd4bcbbb 3a03ba3a6f22f2c44484f5269f3ee425 P4 64f4d44fdbf666004f9a7cbdae961919
b17c3f43db9bf700b6629c4adb9619ca NET/BT P3 64f4d44fdbf666004f9a7cbdae961919
fa863d3fdb1d3740205a328c7c961982 DAP/IBM P2 3a03ba3a6f22f2c44484f5269f3ee425
So it should identify the Incident and Last Group column, because all the values in these two columns are 32 characters long hex code. Some values of SLA Contributor column are 32 long hex code but there are other values also which does not follow that pattern, so it should not include SLA Contributor column.
I am not sure if I have to loop through all the values of a column to check, or there is any better solution for it. I would really appreciate if you could point me in the right direction.
Thanks, Sattyaki