Q:

Finding New/Existing Customers from a Dataframe

I need to create a categorical column indicating whether the client account code has occurred for the first time i.e. "New" or it has occurred before i.e. "Existing".
Only the first occurrence needs to be considered as "New", the rest of the occurrences, irrespective of the gap in occurrences, should all be considered as "Existing".
I tried looping through the list of unique account codes within which I would filter the Dataframe for that particular account code and find the minimum date which would be stored in a separate table. Then looking-up to this table I would enter the New/Existing tag in the categorical column. Couldn't Execute it properly though. 
Is there a simple way to accomplish it?
I have attached the sample file below:
Sample Data
Also the Data has some non UTF-8 encoded characters which couldn't be handled by me.

A:

Try:
df.assign(Occurence=np.where(~df['Account Code'].duplicated(),'New','Existing'))

Output:
  Created Date   Account Code Occurence
0     7-Sep-13       CL000247       New
1     7-Sep-13       CL000012       New
2     7-Sep-13       CL000875       New
3     7-Sep-13       CL000084       New
4     7-Sep-13       CL000186       New
5     7-Sep-13       CL000167       New
6     7-Sep-13       CL000167  Existing
7     7-Sep-13       CL000215       New
8    12-Sep-13  Wan2013001419       New
9    12-Sep-13       CL000097       New
...

