私はパンダのdateframeを持っているし、次のコードは、Pythonのパンダ - インデックス時間 『
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')
誰もがこれを行う方法を知っているエラーメッセージを取得?