pd.to_datetime(df_apto['AF_DT_EMISSAO_NF'].astype('str').str[:8],format='%Y%m%d',errors='coerce')
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter