-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERR: validate partial string indexing with tz-aware end-points #16785
Comments
Your end-point is naive (FYI dateutil.parser is not used anywhere in pandas except as a very last resort as it is slow).
Full working example
@1kastner if you are proposing that we raise if the partial-string indexing with a tz must match on both end-points (if given), I would agree. If you would like to submit a PR would be great. Just step thru to see where the conversions happens. |
Thank you very much for this explanation! I will try to find a good spot to insert the proposed exception. |
@1kastner want to do a PR for this? |
After 17th Oct. (probably a few days earlier) I will have some free time and I'd be interested to solve this. If you prefer to have it solved by somebody else before this date, that'd be no deal for me. |
@1kastner totally fine. |
So the easiest solution seems now to invoke pd.Timestamp("timestamp-string") on the respective endpoint. I do not agree that the timezones should match. Because in some countries they have daylight saving time, so it is completely normal for several countries to change their timezone twice a year. Because of that it is so critical (when not working with UTC) that the timezone information is not ignored. |
Well, in |
Please unsubscribe me
…On Thu, Oct 19, 2017 at 7:16 AM, 1kastner ***@***.***> wrote:
Well, in datetimes.py the parsed offset is totally ignored in the method
_parsed_string_to_bounds, for my case lines 1292-1296. Instead, the
assumed timezone defaults to the timezone of the DatetimeIndex. As said
before, because of daylight saving time (also called "summer time" in
German), this does not necessarily make sense. You should be free to choose
whatever timezone you need for your project, changing with different
contexts. I can understand that if no timezone is provided, it defaults to
the timezone of the DatetimeIndex timezone instead of UTC. But if a
timezone is provided, neglecting it here is not nice.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#16785 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJfa05xyf0SkgOM_s_EQhD6A4waACXVks5sty9vgaJpZM4OHoT7>
.
--
Greg Gurevich
[email protected]
cell: 1-917-504-7105
|
@bkmrkr Can't you unsubscribe yourself? |
@jreback Now I struggle with Visual Studio... It might take some some time to properly check everything. But the main idea is to introduce the following change:
Of course throughout all resolutions |
At #24076 it seems like something has changed. |
I locally built the version 0.24.0.dev0+1448.gb9284a2.dirty and the problem continued to exist. |
great that it is solved, thank you everybody! |
Code Sample, a copy-pastable example if possible
Problem description
The current behavior is that the time zone information is ignored without any warning when providing strings.
Expected Output
Either use the time zone information and only return the four desired entries OR warn the user about the fact that the time zone information is not used
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.0.final.0
python-bits: 32
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.20.1
pytest: None
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.12.1
scipy: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: