Try to handle invalid inputs when converting datetime
df['earth_time'] = pd.to_datetime(df['earth_time'], errors='coerce')