-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
COMPAT: datetime.date comparisons with datetime64[ns] #17965
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
Comments
What would |
These just need wrapping
|
I think the internally consistent thing to do would be to wrap (the constructor should also be able to infer the freq should be "D", but that is a different issue) |
no it’s a Timestamp (conceptually it’s just a shortened datetime) |
That part isn't obvious to me, but conditional on this, then I agree this issue is straightforward. |
FWIW, python raises here
|
|
You might want to try asking on StackOverflow with the "pandas" tag. And
they'll
ask you to make an MCVE: https://stackoverflow.com/help/mcve
…On Wed, Nov 8, 2017 at 1:12 AM, Jason ***@***.***> wrote:
dates = data['TradingDay'].unique()
for date in dates:
print(date)
raw_data = data.loc[data['TradingDay'] == date].copy()
ValueError: cannot set a Timestamp with a non-timestamp```
I get the same error, i just upgrade my Anaconda yesterday.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#17965 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIqjbeKRRartogou5pwZN5OSlQkQsks5s0VRngaJpZM4QE1kt>
.
|
I think a MCVE for @liuli1735 's post is this import pandas as pd
df = pd.DataFrame({'dates': pd.date_range('2000-01-01', '2010-12-31')})
date = df['dates'].unique()[0]
print(df.loc[df['dates'] == date]) Result with
Result with
|
…pandas-dev#18188) (cherry picked from commit 77f10f0)
This should probably work
The text was updated successfully, but these errors were encountered: