Code Sample, a copy-pastable example if possible

from io import StringIO
df = pd.read_csv(StringIO('''Date,A\n8/23/2017,a\n8/22/2017,b\n8/24/2017,c'''), parse_dates=['Date'])
print(df)
print(type(pd.datetime(2017, 8, 22).date()))
print(type(df['Date'][1]))
df_sub = df[df['Date'] == pd.datetime(2017, 8, 22).date()]

Error returned

Traceback (most recent call last):
  File "<pyshell#72>", line 1, in <module>
    df_sub = df[df['Date'] == pd.datetime(2017, 8, 22).date()]
  File "C:\Python35\lib\site-packages\pandas\core\ops.py", line 877, in wrapper
    res = na_op(values, other)
  File "C:\Python35\lib\site-packages\pandas\core\ops.py", line 806, in na_op
    y = libindex.convert_scalar(x, _values_from_object(y))
  File "pandas\_libs\index.pyx", line 494, in pandas._libs.index.convert_scalar
  File "pandas\_libs\index.pyx", line 509, in pandas._libs.index.convert_scalar
ValueError: cannot set a Timestamp with a non-timestamp

Problem description

I just upgraded to pandas version '0.21.0rc1'. The df_sub line above used to work in a prior version. Should a Timestamp and a datetime.date be comparable like it used to in a previous version? Not a huge issue for me but my intent is to just report it in-case it requires attention.

Expected Output

        Date  A
1 2017-08-22  b

Helpful Links

May be a similar or related issue: https://github.com/pandas-dev/pandas/issues/17965 convert_scalar location: https://github.com/pandas-dev/pandas/blob/master/pandas/_libs/index.pyx#L494

Output of pd.show_versions()

[paste the output of ``pd.show_versions()`` here below this line] INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: English_United States.1252 pandas: 0.21.0rc1 pytest: None pip: 9.0.1 setuptools: 20.10.1 Cython: 0.25.2 numpy: 1.13.3 scipy: 0.19.1 pyarrow: None xarray: None IPython: 5.2.2 sphinx: None patsy: 0.4.1 dateutil: 2.6.1 pytz: 2017.2 blosc: None bottleneck: None tables: 3.3.0 numexpr: 2.6.2 feather: None matplotlib: 2.0.0rc2 openpyxl: None xlrd: 1.0.0 xlwt: None xlsxwriter: 0.9.6 lxml: None bs4: 4.5.3 html5lib: 0.9999999 sqlalchemy: 1.1.11 pymysql: None psycopg2: None jinja2: 2.9.5 s3fs: None fastparquet: None pandas_gbq: None pandas_datareader: None

Comment From: jreback

closing as duplicate of #17965

Comment From: liuli1735

`temp = [] 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.