0
  1. Snapshot of the referenced data given below: reference data

I want to create two new columns from this data set.

I need to create a scatter plot to display how each firm performed in the year 2017 based on their average score (x-axis) per their market penetration (y-axis) [# of unique respondents that rated the company / total unique respondents] based on the data (a portion of data is in snapshot)

  1. New column ‘mtkp’. 'mktp' is the #unique respondents per company per year / total unique respondents in 2017

  2. New column 'mean'. mean is the average score given to a company that year.

How do I do it? Any suggestion? I am using Pandas and python 3

  • 1
    Your question is too vague and not reproducible, but you want a custom aggregation (see the duplicate and improve your question if needed) – mozway Jan 12 '23 at 13:17

0 Answers0