How can I create a cohort of people by uploading a...
# ask-ai
a
How can I create a cohort of people by uploading a CSV
b
A message from kapa.ai
To create a cohort of users by uploading a CSV in Mixpanel, you need to follow these steps: 1. Prepare your CSV file. When preparing the CSV that you want to upload as profiles, you should not include column headers (e.g., $name, $email, etc.). Instead, you’ll identify column headers through the CSV upload wizard in the Mixpanel UI. The maximum size for your CSV should be 1M rows. If you import profiles using
$distinct_id
(or
$group_id
) values that already exist, those profiles will be updated with the additional profile properties. If you upload a CSV with new information for existing properties on existing profiles, the existing property values will be overwritten. If the new information is for new properties on existing profiles, it will be added as additional properties for the profiles. [source](https://docs.mixpanel.com/docs/data-structure/user-profiles) 2. Upload your CSV. Go to the Import from CSV tab and select your prepared CSV to begin the process. [source](https://docs.mixpanel.com/docs/data-structure/user-profiles) 3. To sort the uploaded profiles into a cohort, add a value to the CSV which sorts the profiles into a cohort as a property. For example, give each profile the unique property of "Cohort = Android Users". [source](https://docs.mixpanel.com/docs/users/overview) 4. After uploading, go to the [Cohorts](https://docs.mixpanel.com/docs/users/cohorts#creating-cohorts) tab to create a cohort as usual, and filter to user profiles with that property and save. This will create a cohort of users with that matching property. [source](https://docs.mixpanel.com/docs/users/overview) Please note that when creating cohorts this way, the cohort will remain static, meaning that it will not update over time like other cohorts as the property is unchanging. [source](https://docs.mixpanel.com/docs/users/overview)
a
How do I add a unique property to the CSV? @square-processor-78551
b
A message from kapa.ai
To add a unique property to the CSV file you're preparing for Mixpanel, you would typically add a new column in your CSV file and fill it with the unique property values for each user. Here's a simple example:
Copy code
distinct_id, email, Cohort 1, <mailto:user1@example.com|user1@example.com>, Android Users 2, <mailto:user2@example.com|user2@example.com>, iOS Users 3, <mailto:user3@example.com|user3@example.com>, Android Users ...
In this example, "Cohort" is the unique property we're adding, and "Android Users" or "iOS Users" are the values of this property for each user. Please note that when you upload this CSV in Mixpanel, you should not include these column headers (e.g., distinct_id, email, Cohort). Instead, you'll identify these column headers through the CSV upload wizard in the Mixpanel UI. [source](https://docs.mixpanel.com/docs/data-structure/user-profiles) After uploading, you can create a cohort based on this unique property. For example, you can create a cohort of "Android Users" by filtering user profiles with "Cohort = Android Users". [source](https://docs.mixpanel.com/docs/users/overview)