////////
Search
Duplicate

디바이스 & UX 관련

Tags
Archive
ETA
2025/06/17
Main Task
Sub Task
담당자
메모
상태
Done
생성 일시
2025/06/16 10:17
우선 순위
진행률 %
Task
1.
eReader 사용자가 초반(5% 이내)에서 이탈한 경우, 기기 성능 또는 기술적 제약으로 인해 콘텐츠 이용을 포기했을 가능성이 있다.
2.50대 이상 고연령층의 이탈률이 높은 것은 가독성이나 인터페이스 불편 등 연령 특화 UX 부족 때문일 가능성이 있다.
3.사용 기기에 따라 UX 불편으로 인한 이탈률의 차이가 나타날 것이다.
4.기기 화면 설정에서 custom으로 설정한 사람은 ux불편의 이유로 이탈할 비율이 적을 것이다.
유니크함수를 이용해서 오탈자나 결측치 처리해주기!
.info() 를 이용해서 확인할 수 있는 결측치들을 처리해줬습니닭!
또한 2번 가설을 풀어내기 위해 birthday 컬럼을 int에서 datetime으로 변경해줬습니닭!
실행 및 진행 사항 정리
# 문자형 컬럼 중 유니크 값이 10개 이하인 것들만 확인해볼게요 for col in merged.columns: if merged[col].dtype == 'object' and merged[col].nunique() <= 10: print(f"\n컬럼명: {col}") print(merged[col].value_counts(dropna=False)) # 1. dropout_reason_detail 컬럼에서 오타 수정 merged['dropout_reason_detail'] = merged['dropout_reason_detail'].replace({'금한일': '급한일'}) # 2. gender 컬럼: 대소문자 구분 없이 정리 merged['gender'] = merged['gender'].str.strip().str.lower() merged['gender'] = merged['gender'].replace({'female': 'female', 'male': 'male'}) # 혹시 모를 오타 대비 # 3. theme_mode 컬럼 정리 merged['theme_mode'] = merged['theme_mode'].str.strip().str.lower() merged['theme_mode'] = merged['theme_mode'].replace({ 'dark_mode': 'dark', 'Light': 'light', 'customized': 'custom' }) #4.dropout_reason_detail에서 나온 NaN값이 350개여서 알수없음 범주를 만들어서 넣어줌! merged['dropout_reason_detail'] = merged['dropout_reason_detail'].fillna('알 수 없음') #birthday 컬럼에 NaN값을 지워줄게욝 merged['birthday'].isnull().sum() merged = merged[merged['birthday'].notnull()] print(merged.head(10)) #birthday 컬럼이 int여서 datetime으로 바꿔줬습니닭! merged['birthday'] = pd.to_datetime(merged['birthday']) merged.info() # birthday 컬럼에서 age, age_group 파생 변수 만들기 merged['birth_year'] = merged['birthday'].dt.year current_year = pd.Timestamp.now().year merged['age'] = current_year - merged['birth_year'] # 연령대 구간 설정 bins = [0, 19, 29, 39, 49, 59, 200] labels = ['10대 이하', '20대', '30대', '40대', '50대', '60대 이상'] merged['age_group'] = pd.cut(merged['age'], bins=bins, labels=labels, right=True) merged.info()
Python
복사
결과
<class 'pandas.core.frame.DataFrame'> Index: 990 entries, 0 to 999 Data columns (total 19 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 user_id 990 non-null object 1 book_id 990 non-null object 2 genre 990 non-null object 3 exit_position_numeric 990 non-null int64 4 dropout_reason_category 990 non-null object 5 dropout_reason_detail 990 non-null object 6 gender 990 non-null object 7 birthday 990 non-null datetime64[ns] 8 device_type 990 non-null object 9 subscription_plan 990 non-null object 10 theme_mode 990 non-null object 11 Unnamed: 0 990 non-null int64 12 entry_channel 990 non-null object 13 quick_preview_used 990 non-null object 14 recommendation_clicked 990 non-null bool 15 last_access_timestamp 990 non-null object 16 birth_year 990 non-null int32 17 age 990 non-null int32 18 age_group 990 non-null category dtypes: bool(1), category(1), datetime64[ns](1), int32(2), int64(2), object(12) memory usage: 133.6+ KB
Python
복사