I have a pandas dataframe called df of about 2 million records.
There is a column called transaction_id that might contain:
- alpha values (e.g. "abscdwew") for some records
- numeric values (e.g. "123454") for some records
- both alpha and numeric values (e.g. "asd12354") for some records
- alpha, numeric and special characters (e.g. "asd435_!") for some records
- special characters (e.g. "_-!")
I want to drop that column if ALL values (i.e. across ALL records) contain:
- combination of alpha and numeric values (e.g. "aseder345")
- combination of alpha and special characters (e.g. "asedre_!")
- combination of numeric and special characters (e.g. "123_!")
- all special characters (e.g. "!")
Is there a pythonic way of doing so?
So, if a column contains across al