Re: Untitled

From Bistre Coyote, 4 Months ago, written in Python, viewed 132 times. This paste is a reply to Untitled from Diminutive Madrill - view diff
URL Embed
Download Paste or View Raw
  1. for k in range(0, 23566):
  2.     for locality_name in real_estate_spb['locality_name']:
  3.         if 'городской поселок' in locality_name:
  4.             locality_name = locality_name.replace('городской поселок', 'поселок')
  5.         elif 'городской посёлок' in locality_name:
  6.             locality_name = locality_name.replace('городской посёлок', 'поселок')
  7.         elif 'поселок городского типа' in locality_name:
  8.             locality_name = locality_name.replace('поселок городского типа', 'поселок')
  9.         elif 'посёлок городского типа' in locality_name:
  10.             locality_name = locality_name.replace('посёлок городского типа', 'поселок')
  11.         elif 'посёлок' in locality_name:
  12.             locality_name = locality_name.replace('посёлок', 'поселок')
  13.     real_estate_spb.loc[k, 'locality_name'] = locality_name

Reply to "Re: Untitled"

Here you can reply to the paste above