How to check if column with name is valid by regex?

Viewed 38

How to check if column with name is valid by regex in Pandas:

I have tried this way:

r = df['ADDRESS'].str.findall('^((?:0[1-9]|1[0-2]))[.\/\\\\-]*([0-9]{2})[.\/\\\\]([1|2][0-9]{3})$')

if not r:
   df['ADDRESS'] = "Bird"

It does not work for meю

My goas is to move values from columns to specifci columns by content.

Exmaple is:

ID NAME         EMAIL
1  @GMAIL.COM   Inigma
@  Mary         4

As result I should arrange values by columns names:

ID NAME         EMAIL
1  Inigma       @GMAIL.COM
2  Mary         @
0 Answers
Related