import pandas as pd
import NumPy as np
import datetime
原始数据:
df["year"] = df["year"].astype(int).apply(lambda x: str(x).zfill(2))
df["month"] = df["month"].astype(int).apply(lambda x: str(x).zfill(2))
df["day"] = df["day"].astype(int).apply(lambda x: str(x).zfill(2))
df['time'] = df['year'].map(str)+df['month'].map(str)+df['day'].map(str)
df = df.drop(columns = 'year')
df = df.drop(columns = 'month')
df = df.drop(columns = 'day')