ValueError: Could not convert object to NumPy datetime

This issue has been tracked since 2022-09-21.

Research

  • I have searched the [pandas] tag on StackOverflow for similar questions.

  • I have asked my usage related question on StackOverflow.

Link to question on StackOverflow

ValueError Traceback (most recent call last) in 33 vac_strt_end = [vdf.loc[vdf['CAREGIVERID'] == cg]["START_DATE"], vdf.loc[vdf['CAREGIVERID'] == cg]["END_DATE"]] 34 if not(vac_strt_end[0].empty) and not(vac_strt_end[1].empty) : ---> 35 vac_days = np.arange(vac_strt_end[0], vac_strt_end[1], dtype = 'datetime64[D]') 36 for d in np.union1d( schedule_days, vac_days): 37 idx = np.where(d = schedule_days)[0] ValueError: Could not convert object to NumPy datetime

Question about pandas

ValueError Traceback (most recent call last)
in
33 vac_strt_end = [vdf.loc[vdf['CAREGIVERID'] == cg]["START_DATE"], vdf.loc[vdf['CAREGIVERID'] == cg]["END_DATE"]]
34 if not(vac_strt_end[0].empty) and not(vac_strt_end[1].empty) :
---> 35 vac_days = np.arange(vac_strt_end[0], vac_strt_end[1], dtype = 'datetime64[D]')
36 for d in np.union1d( schedule_days, vac_days):
37 idx = np.where(d = schedule_days)[0]

ValueError: Could not convert object to NumPy datetime

MarcoGorelli wrote this answer on 2022-09-21

Hi - please post a reproducible example, see

https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports

for how

MarcoGorelli wrote this answer on 2022-09-22

closing, will reopen if you address the above

More Details About Repo
Owner Name pandas-dev
Repo Name pandas
Full Name pandas-dev/pandas
Language Python
Created Date 2010-08-24
Updated Date 2022-10-04
Star Count 35430
Watcher Count 1120
Fork Count 15089
Issue Count 3589

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date