In #Python #Pandas, dt still works on NaT ("not a time"). You'll get NaN, but that's better than an error: df['tpep_pickup_datetime'].dt.year # float year (forced by NaN) or NaN df['tpep_pickup_datetime'].dt.day_name() # string or NaN
0 reposts0 likes