Advertisement
elena1234

RegEx for cyrillic in Python

Oct 13th, 2022
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | Source Code | 0 0
  1. location_ = []
  2. for index, row in all_ads_until_10_Oct.iterrows():
  3.     text = row['Information']
  4.     text_array = text.split()
  5.     if 'Дистанционна' in text_array:
  6.         location_.append('Дистанционна работа')
  7.     elif len(text_array) != 0 :
  8.         matches = re.findall('[А-Яа-яЁё.]+', text)
  9.         location_.append(matches)
  10.     else:
  11.         location_.append(np.nan)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement