Python Forum
Python group by and aggregate
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python group by and aggregate
#2
Hi Alex,
what i sometimes do if i would like to know what methods can be used on an object is this:
[func for func in dir(test.groupby('ID')) if func[0] != '_']
This gives you a long list of methods and/or properties.

In your case test.groupby('ID').sum() might be interesting.
Look also into .count() .groups .nunique()
Reply


Messages In This Thread
Python group by and aggregate - by dervast - Aug-27-2019, 06:57 AM
RE: Python group by and aggregate - by ThomasL - Aug-27-2019, 12:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to parse and group hierarchical list items from an unindented string in Python? ann23fr 0 205 Mar-27-2024, 01:16 PM
Last Post: ann23fr
  Python and pandas: Aggregate lines form Excel sheet Glyxbringer 12 1,913 Oct-31-2023, 10:21 AM
Last Post: Pedroski55
  group by create pivot table python dawid294 1 1,305 Jun-22-2022, 06:13 PM
Last Post: Larz60+
  df column aggregate and group by multiple columns SriRajesh 0 1,052 May-06-2022, 02:26 PM
Last Post: SriRajesh
  Aggregate krisrajz 1 37,259 Apr-11-2021, 08:48 PM
Last Post: Yoriz
  Python list - group by dict key karthidec 2 9,436 Nov-25-2019, 06:58 AM
Last Post: buran
  How to aggregate rows with same column Leoni 1 2,536 Jul-08-2018, 08:33 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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