Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_gametime(time_columns):
- """文字列型で表されている試合時刻を、datetime型に変換する関数
- """
- result = []
- for game_time in time_columns:
- prefix_time = f"{datetime.now().year}:{datetime.now().month}:{datetime.now().day}:"
- true_game_time = datetime.strptime(prefix_time+ game_time, "%Y:%m:%d:%H:%M")
- result.append(true_game_time)
- return result
- # df.iloc[:, "Time"] = get_gametime(df.iloc[:, "Time"])
Add Comment
Please, Sign In to add comment