question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty error message in tz_localize

See original GitHub issue

Code Sample, a copy-pastable example if possible

# Your code here
from pandas import Timestamp
Timestamp.min.tz_localize("Asia/Tokyo")

The example is picked directly from pandas/tests/scalar/timestamp/test_timezones.py::TestTimestampTZOperations::test_tz_localize_pushes_out_of_bounds

Problem description

Error message is empty.

yep, out of scope. but if you could raise an issue, that’ll be great.

_Originally posted by @simonjayhawkins in https://github.com/pandas-dev/pandas/pull/32929_

Expected Output

Meaningful error message

Output of pd.show_versions()

INSTALLED VERSIONS

commit : bbfecaffa1887a86a801213fd3e1d6188f7d3456 python : 3.7.6.final.0 python-bits : 64 OS : Linux OS-release : 5.3.0-40-generic Version : #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8

pandas : 1.1.0.dev0+943.gbbfecaffa numpy : 1.18.1 pytz : 2019.3 dateutil : 2.8.1 pip : 20.0.2 setuptools : 46.0.0.post20200311 Cython : 0.29.15 pytest : 5.4.1 hypothesis : 5.6.0 sphinx : 2.4.4 blosc : None feather : None xlsxwriter : 1.2.8 lxml.etree : 4.5.0 html5lib : 1.0.1 pymysql : None psycopg2 : None jinja2 : 2.11.1 IPython : 7.13.0 pandas_datareader: None bs4 : 4.8.2 bottleneck : 1.3.2 fastparquet : 0.3.3 gcsfs : None matplotlib : 3.2.0 numexpr : 2.7.1 odfpy : None openpyxl : 3.0.3 pandas_gbq : None pyarrow : 0.16.0 pytables : None pyxlsb : 1.0.6 s3fs : 0.4.0 scipy : 1.4.1 sqlalchemy : 1.3.15 tables : 3.6.1 tabulate : 0.8.6 xarray : 0.15.0 xlrd : 1.2.0 xlwt : 1.3.0 numba : 0.48.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
sumanau7commented, Mar 24, 2020

take

0reactions
gabrielNTcommented, Jul 8, 2020

take

Read more comments on GitHub >

github_iconTop Results From Across the Web

pandas.Series.dt.tz_localize — pandas 1.5.2 documentation
This method takes a time zone (tz) naive Datetime Array/Index object and makes this time zone aware. It does not move the time...
Read more >
Python pandas tz_localize throws NonExistentTimeError, then ...
Python pandas tz_localize throws NonExistentTimeError, then unable to drop erroneous times. Save this question. Show activity on this post. For ...
Read more >
Pandas DataFrame tz_localize() Method - Finxter
This snippet will allow the code in this article to run error-free. ... moves the blank/invalid time forward to the nearest non-empty time....
Read more >
raw - Hugging Face
</code></pre> <p>The DataFrame is read from a CSV file. ... Use a.empty, a.bool(), a.item(), a.any() or a.all() - Stack Overflow</h3> <h4>Tags: python ...
Read more >
Dealing with dates and time in Pandas - Bartosz Mikulski
We can decide to ignore errors or return an empty value in case if an ... Note that the code above did not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found