Python Forum
GroupBy - Sum = Error [datetime64 type does not support sum operations]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GroupBy - Sum = Error [datetime64 type does not support sum operations]
#4
Fine, make it an index. The problem was that you were not doing so correctly.
pme_df = filtered_df[["Market", "Price"]].set_index("Market").sum()
BSDevo likes this post
Reply


Messages In This Thread
RE: GroupBy - Sum = Error [datetime64 type does not support sum operations] - by deanhystad - Oct-27-2023, 05:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Bitwise Operations in numpy Sowmya 3 446 Apr-03-2024, 02:51 PM
Last Post: deanhystad
  [Numpy] Load date/time from .txt to 'datetime64' type. water 4 874 Mar-01-2024, 11:16 PM
Last Post: Gribouillis
  Type error in Cross_val_score Vicral 0 1,882 Jul-20-2021, 12:18 PM
Last Post: Vicral
  groupby on var with missing values error zenvega 0 1,851 May-07-2021, 07:40 PM
Last Post: zenvega
  type error array BrianPA 2 2,487 Jan-17-2021, 01:48 PM
Last Post: BrianPA
  How to fill datetime64 field in numpy structured array? AlekseyPython 0 2,356 Oct-20-2020, 08:17 AM
Last Post: AlekseyPython
  Error binding parameter 0 - probably unsupported type. illmattic 7 10,592 Jul-18-2020, 09:32 PM
Last Post: illmattic
  Error Message: TypeError: unhashable type: 'set' twinpiques 4 19,339 May-22-2019, 02:31 PM
Last Post: twinpiques
  Error:unsupported operand type(s) for ** or pow(): 'list' and 'int' mcgrim 3 18,580 Mar-22-2019, 01:29 PM
Last Post: buran
  Type Error Confusion Oliver 4 14,661 Dec-06-2017, 03:20 PM
Last Post: Oliver

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020