text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df = pd.read_csv('/kaggle/input/thailand-fatal-road-accident/thailand_fatal_raod_accident_2011_2022.csv')

df['official_death_date'] = pd.to_datetime(df['official_death_date'])

thai_accident_df = df.dropna(subset='accident_date').copy()

thai_accident_df['accident_date'] = pd.to_datetime(thai_accident_df['accident_date'])
thai_accident_df.dtypes