You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MarcoGorelli
changed the title
BUG: parsing ISO8601 string with format= and UTC fails
BUG: parsing ISO8601 string with format= and timezone name fails
Nov 17, 2022
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
In pandas 1.5.1:
Issue Description
The ISO8601 fastpath in
https://github.com/pandas-dev/pandas/blob/6ec3d8f9dfd5dc89a2e9695ee4e01d8c280ebe2c/pandas/_libs/tslibs/src/datetime/np_datetime_strings.c
has no way to deal with
'%Z'
formatted-strings. They shouldn't get there in the first place.Hence,
'%Z'
should be excluded frompandas/pandas/_libs/tslibs/parsing.pyx
Lines 886 to 903 in 634196a
Expected Behavior
Installed Versions
INSTALLED VERSIONS
commit : 91111fd
python : 3.10.6.final.0
python-bits : 64
OS : Linux
OS-release : 5.10.102.1-microsoft-standard-WSL2
Version : #1 SMP Wed Mar 2 00:30:59 UTC 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 1.5.1
numpy : 1.23.3
pytz : 2022.2.1
dateutil : 2.8.1
setuptools : 65.3.0
pip : 22.2.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.1
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.5.0
pandas_datareader: None
bs4 : 4.11.1
bottleneck : None
brotli : None
fastparquet : None
fsspec : 2022.10.0
gcsfs : None
matplotlib : 3.6.1
numba : None
numexpr : None
odfpy : None
openpyxl : 3.0.10
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : 2022.10.0
scipy : 1.9.1
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
tzdata : None
None
The text was updated successfully, but these errors were encountered: