I am new to python and trying to write the below code. I can do it using a for loop, iterating over the rows, but I can to see if it is possible to vectorize or without the for loop.

```
Col1 Col2
ABC  A 
ABC1 B
CA   C
PU   C
XYZ  A

```

What I want to do is:
IF Col1 contains only uppercase alphabets - then update Col2 to 'A'
IF Col1 has specific strings "CA" or "PU" - then update Col2 to 'C'
IF Col1 has alphanumeric values - then update Col2 to 'B'

Any help will be much appreciated.