title: How do I assign 'other' to low frequency categories? (pandas)
body: <p>I have a 'city' column which has more than 1000 unique entries. (The entries are integers for some reason and are currently assigned float type.)</p>
  <p>I tried <code>df['city'].value_counts()/len(df)</code> to get their frequences. It returned a table. The fist few values were 0.12,.4,.4,.3.....</p>
  <p>I'm a complete beginner so I'm not sure <strong>how to use this information to assign everything in, say,  the last 10 percentile to 'other'</strong>.</p>
  <p>I want to reduce the  unique city values from 1000 to something like 10, so I can later use <code>get_dummies</code> on this.</p>