5
Ich habe einen Datenrahmen, der Auktions-IDs und Gebotspreise hat. Der Datenrahmen wird durch Auktion ID (aufsteigend) und Geldkurs (absteigend) sortiert:Pandas Rang nach Spalte Wert
Auction_ID Bid_Price
123 9
123 7
123 6
123 2
124 3
124 2
124 1
125 1
Ich möchte eine Spalte namens ‚Auction_Rank‘ hinzufügen, die Auktion ids durch Geldkurs stuft:
Auction_ID Bid_Price Auction_Rank
123 9 1
123 7 2
123 6 3
123 2 4
124 3 1
124 2 2
124 1 3
125 1 1