Python Forum
Finding Max and Min Values Associated with Unique Identifiers in Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding Max and Min Values Associated with Unique Identifiers in Python
#2
df['ID_Max']= df.groupby(['ID'])['N1'].transform(max)
df['ID_Min']= df.groupby(['ID'])['N1'].transform(min)
Reply


Messages In This Thread
RE: Finding Max and Min Values Associated with Unique Identifiers in Python - by anbu23 - May-08-2020, 12:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Get an average of the unique values of a column with group by condition and assign it klllmmm 0 287 Feb-17-2024, 05:53 PM
Last Post: klllmmm
  5 variants to invert dictionaries with non-unique values Drakax1 2 2,614 Aug-31-2020, 11:40 AM
Last Post: snippsat
  How to compare two columns and highlight the unique values of column two using pandas shubhamjainj 0 4,300 Feb-24-2020, 06:19 AM
Last Post: shubhamjainj
  Getting Unique values from LISTS aankrose 2 2,261 Oct-17-2019, 05:33 PM
Last Post: aankrose
  Finding nearest point of a Multidigraph in Python 3.7 stixmagiggins 5 3,782 Aug-24-2019, 08:51 AM
Last Post: ThomasL
  Help with finding correct topic in Python learning yahya01 1 2,213 Jun-06-2019, 05:01 PM
Last Post: buran
  getting unique values and counting amounts Truman 26 10,204 Mar-15-2019, 12:44 AM
Last Post: Truman
  finding problems connecting python to sqlite Dennis 1 2,293 Dec-10-2018, 02:58 PM
Last Post: Larz60+
  finding 2 max values in an array in python Akankshha 11 190,438 Oct-18-2018, 09:16 AM
Last Post: perfringo
  finding own python source file to read it Skaperen 3 3,017 Aug-27-2018, 11:23 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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