app/lists.py
def calc_high_open_rate_pct(self):
        """Calcuates the percentage of subscribers who open >80% of emails."""

        # Sum the number of rows where average open rate exceeds 0.8
        # And the member is a subscriber
        # Then divide by the total number of rows
        self.high_open_rt_pct = (
            sum(x > 0.8 for x in self.df[self.df['status'] == 'subscribed']
                ['avg_open_rate']) / self.subscribers)
Calcuates the percentage of subscribers who open >80% of emails.
Calcuates the percentage of subscribers who open >80% of emails.
Calcuates the percentage of subscribers who open > 80% of emails .
def calc_high_open_rate_pct(self):
        self.high_open_rt_pct = (
            sum(x > 0.8 for x in self.df[self.df['status'] == 'subscribed']
                ['avg_open_rate']) / self.subscribers)
def calc_high_open_rate_pct ( self ) : self . high_open_rt_pct = ( sum ( x > 0.8 for x in self . df [ self . df [ 'status' ] == 'subscribed' ] [ 'avg_open_rate' ] ) / self . subscribers )
Calcuates the percentage of subscribers who open >80% of emails.
Calcuates the percentage of subscribers who open > 80% of emails .
"""Calcuates the percentage of subscribers who open >80% of emails.""" # Sum the number of rows where average open rate exceeds 0.8
 # And the member is a subscriber
 # Then divide by the total number of rows

self