KOTA ITO

Generation

generate functionMon, 05 Dec 2022

pandasデータフレームの中の、日付の列の、秒を削除する。

def remove_second(df): df['time'] = df['time'].dt.strftime('%Y-%m-%d %H:%M') return df

Questions about programming?Chat with your personal AI assistant