6차 전처리 과정
전처리 과정 명세
실행 코드
# df['ARP_ODP'] = df['ARP'].astype(str) + df['ODP'].astype(str)
arp = (df[['ARP_ODP', 'DLY']].groupby('ARP_ODP').sum())/(df[['ARP_ODP', 'DLY']].groupby('ARP_ODP').count())
arp = arp[arp['DLY']>0.1]
arp = arp.index
# #arp.index
for i in arp:
df['ARP_ODP'].loc[df['ARP_ODP']==i] = 1
df['ARP_ODP'].loc[df['ARP_ODP']!=1] = 0
# REG를 다른 방식으로
df['SAME_DAY'] = (df['SDT_YY']*10000 + df['SDT_MM']*100 + df['SDT_DD']).astype(str) + df['FLO']
df = df.drop(['ARP', 'ODP'], axis = 1)전처리 결과

Last updated
Was this helpful?