Python Forum
Check for a special characters in a column and flag it
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check for a special characters in a column and flag it
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Big Grin Variable flag vs code outside of for loop?(Disregard) cubangt 2 542 Mar-16-2022, 08:54 PM
Last Post: cubangt
  Rename Multiple files in directory to remove special characters nyawadasi 9 3,447 Feb-16-2021, 09:49 PM
Last Post: BashBedlam
  Python Openpyxl is unable to check from Column 6 onwards Skye 0 935 Oct-13-2020, 06:11 AM
Last Post: Skye
  Remove escape characters / Unicode characters from string DreamingInsanity 5 8,089 May-15-2020, 01:37 PM
Last Post: snippsat
  how to check for thread kill flag nanok66 1 1,504 May-09-2020, 10:06 PM
Last Post: nanok66
  Using a flag error blackjesus24 1 1,093 Jan-30-2020, 09:42 AM
Last Post: buran
  Check for funny characters with a regexp bertilow 4 1,792 Jan-19-2020, 10:16 AM
Last Post: bertilow
  Identifying string success flag graham23s 4 2,110 Aug-14-2019, 09:27 PM
Last Post: graham23s
  Pynput doesn't recognize shift button and special characters VirtualDreamer 0 2,170 Jul-17-2019, 11:55 AM
Last Post: VirtualDreamer
  Practicing using a "flag": please point in right direction magsloo 5 2,133 May-10-2019, 04:58 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020