<aside> 📌 Task : 데이터 분석을 바탕으로 시각화 시키기
</aside>
→ 구독 플랜이 유료인 유저가 더 적게 이탈할것이다.
<aside> 📌 실행 및 진행 사항 정리
</aside>
✅1 구독 플랜 유료 vs 무료 비교 ⇒ free_trial을 쓰는 유저가 가장 많음
✅2 이탈 여부 : 이탈 유저만 구분해서 이탈률, 행동 패턴 분석 가능하게 만들기
✅3 exit_position_numeric 칼럼 통해서 “평균 이탈 위치 분석”
바탕 - 분석 내용
<aside> 📌 결과
</aside>
구독 플랜 별 평균 이탈시점, 이탈률, 마지막 접속 시간
수정 후
# 1. 평균 이탈 위치
exit_mean = final_merge.groupby('subscription_plan')['exit_position_numeric'].mean()
# 2. 이탈률 계산
dropout_rate = final_merge.groupby('subscription_plan')['이탈여부확인'].apply(
lambda x: (x == '이탈').mean())
# 3. 활동 시간대(work_last_access_time) 분포 (비율)
work_time_dist = final_merge.groupby(['subscription_plan', 'work_last_access_time']).size().unstack(fill_value=0)
work_time_dist = work_time_dist.div(work_time_dist.sum(axis=1), axis=0) # 비율로 정규화
# 4. 이탈 사유(category) 분포 (비율)
dropout_cat_dist = final_merge.groupby(['subscription_plan', 'dropout_reason_category']).size().unstack(fill_value=0)
dropout_cat_dist = dropout_cat_dist.div(dropout_cat_dist.sum(axis=1), axis=0) # 비율로 정규화
# 5. 하나로 합치기
summary_df = pd.DataFrame({
'평균 이탈 위치': exit_mean,
'이탈률': dropout_rate
})
# 6. 활동 시간대와 이탈 사유 비율 통합
summary_df = summary_df.join(work_time_dist, how='left')
summary_df = summary_df.join(dropout_cat_dist, how='left')
# 보기 좋게 정렬
summary_df.reset_index(inplace=True)

# 1. 평균 이탈 위치
exit_mean = final_merge.groupby('subscription_plan')['exit_position_numeric'].mean()
# 2. 이탈률 계산 (요청한 방식 그대로)
dropout_rate = final_merge.groupby('subscription_plan')['이탈여부확인'].apply(
lambda x: (x == '이탈').mean()
)
# 3. 활동 시간대(work_last_access_time)별 count
work_time_count = final_merge.groupby(['subscription_plan', 'work_last_access_time']).size().unstack(fill_value=0)
# 4. 이탈 사유(category)별 count
dropout_cat_count = final_merge.groupby(['subscription_plan', 'dropout_reason_category']).size().unstack(fill_value=0)
# 5. 하나로 합치기
summary_df = pd.DataFrame({
'평균 이탈 위치': exit_mean,
'이탈률': dropout_rate
})
summary_df = summary_df.join(work_time_count, how='left')
summary_df = summary_df.join(dropout_cat_count, how='left')
summary_df.reset_index(inplace=True)
# 결과 보기
summary_df

큰 가설에서 나온 세부 내용에 대한 가설은 맞다.
구독 플랜이 유료인 유저 일수록 더 작게 이탈하지만, 이탈률을 봤을때 엄청나게 유의미한 차이가 나오진 않았다.
팀원들 피드백 : 결론은 다 합쳐서 정하는게 좋을것같다고 생각!