가 나는 팬더 dateframe가 다음과 같은 코드가파이썬 팬더 - 색인 시간 '
df['hour'] = df.index.hour
df['c'] = df['hour'].apply(circadian)
작동하지만 내가 할 필요 줄이기 위해 노력했다'는 사용 시간 'coloumn를'객체에는 속성이 없습니다 ' 코드
df['c'] = df.apply(lambda x: circadian(x.index.hour), axis=1)
다음 그러나 나는
AttributeError: ("'Index' object has no attribute 'hour'", u'occurred at index 2015-09-25 01:00:00')
사람이이 작업을 수행하는 방법을 알고있는 오류 메시지가 얻을?