ValueError: Could not convert object to NumPy datetime

This issue has been created 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-09-29
Star Count 35374
Watcher Count 1122
Fork Count 15034
Issue Count 3579

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
训练yolox-convnext_s_backbone.yaml过程中的问题 1 2022-09-19 2022-09-29
Understanding font versioning and updates in the last 6 months 1 2020-12-18 2022-09-18
[UI] Highlighting the active blog category or tag 2 2022-03-15 2022-04-11
Check telegram session 0 2022-08-04 2022-09-21
Spam Video ID Submission 0 2022-08-16 2022-09-06
Spam Video ID Submission 0 2022-08-12 2022-09-06
Discover hangs indefinitely 5 2019-06-06 2022-08-20
MarkerInfoWindowContent causing NoSuchElementException with Renderer.LATEST 2 2022-03-12 2022-09-15
Add support to get the visible region 2 2022-02-27 2022-09-20
OAuth tokens may not have access to SAML-enabled organizations 1 2021-01-06 2022-07-28
Failed to build `Rust nightly not installed, please install it!` 3 2021-10-09 2022-09-13
Placeholder on floating labels being shown on nigthshade darkmode 5 2021-07-16 2022-09-02
The answer to the riddle of the private proxy implemenation 0 2022-08-11 2022-09-11
How to run my script only when consent is given? 3 2022-01-11 2022-07-16
Reconsider destructive encoding form for AES instructions 7 2021-10-22 2022-09-19
Color selection row 2 2021-07-02 2022-01-12
model.fit fails it gives me many errors 0 2019-04-11 2022-08-28
USNO IERS services are back online, but do we still care? 1 2022-01-24 2022-08-04
Path to RTP Dialog Covered by Splash at Startup 4 2022-06-27 2022-09-13
Single node test deployment. 1 2021-09-20 2022-09-16
Add more detail to error when a handler doesn't exist yet 3 2021-06-22 2022-01-01
Automatic Test Gen: Default Type of Type Parameters 0 2022-06-07 2022-09-27
AttributeError: 'PyanNet' object has no attribute 'activation' 2 2021-05-06 2022-08-28
Qt based app's context menus are off-screen on Wayland 4 2022-03-10 2022-09-15
Could you make this as an ipa for jailbroken iOS? 1 2021-06-04 2022-09-12
Need Table Extraction examples for latest FR version 0 2020-06-09 2022-09-08
Additional config changes were needed to view the static website 3 2021-09-23 2022-08-28
Running npm run build in 10-dynamic-block breaks the block 1 2022-03-28 2022-09-24
Use FormRequest with useForm 1 2021-06-19 2022-09-07
ContentSwitcher: icon only variant 1 2021-10-11 2022-07-14
better support for cloud drive syncing 2 2022-01-12 2022-09-29
CVE-2021-24746 - Reflected XSS though Sassy Social Share Wordpress plugin 1 2022-04-01 2022-09-25
add fixed (1/512) Filter index 7 2022-04-26 2022-09-21
unmarshal JSONData.jsonData.esVersion after clicking in Grafana 1 2021-12-10 2022-09-03
Webhook avatar not present on first send 1 2022-06-03 2022-08-21
K8s Event uses wrong namespace for the reference object 1 2021-09-15 2022-08-21
can not reference variable in inline template 2 2021-12-17 2022-07-17
Strange Conversions in 0.13.499.102: とっぷちーむ → Jong 9 2015-04-22 2022-09-18
README.rst: Typos 1 2017-10-13 2021-12-19
vs-switch triggered twice on WKWebview 0 2021-01-20 2022-09-09
href's created by using backticks create a relative url (to the base_url), the repository name is not included. 1 2022-06-02 2022-08-26
Synthesis failed for java-vision 1 2021-09-08 2022-09-11
Better diagnostics for accidentally nested block comments 2 2022-03-24 2022-08-20
[FEATURE]1.17 版本测试计划的定时任务的任务通知只能选择执行完成的类型通知很不合理,大部分情况下我们更需要有用例执行失败后才进行通知 1 2022-02-09 2022-09-09
editor.suggest.preview looks indistinguishable from comment in bash file 15 2021-09-10 2022-09-08
Creating npm repos as part of the base nexus config 0 2017-07-11 2022-06-23
Is "import C" actually needed? 0 2015-09-15 2022-09-22
Grab properties of Period object 1 2021-10-07 2022-09-16
match is different from Tinkerpop and incorrect 0 2022-06-22 2022-09-16
🐛[BUG]prolayout组件无法兼容IE11 3 2021-09-15 2022-09-15