Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
毎年のデータの週平均を取得したいと考えています。だから私はgroupby以下のコードのように週と年を使用しています:
groupby
hdfc.groupby([hdfc.Date.dt.year,hdfc.Date.dt.week]).mean()
データの列として週と年を作成するにはどうすればよいですか? 両方の列に groupby 関数によって生成された Date という名前があるため、reset_index() は「Date を挿入できません。既に存在します」というエラーを表示します。