Python Forum

Full Version: Check for a special characters in a column and flag it
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a data frame with a below column and would like to do some characters/special character search on it

Price
-----
123
$123
-123
A123
e123
234.5
675

How do I search for Alphabets and special characters in the price column and create a new column "flag" using python ? Here is my desired output

Price Flag
----- ----
123 0
$123 1
-123 1
A123 1
e123 1
234.5 0
675 0