-1

I have a pandas series (edit: whoops meant dataframe) as shown here: image

I have two questions. First, what is the syntax to display/return all winning hands where Players at Table = 4, and Players to Showdown = 2?

Secondly, I am trying to then sort the "winning hand" values in order of their poker strength. Would I have to create a custom sort algorithm for this, where I would pre-code information such as King pair > Jack pair? I'm not really sure what the most efficient way to go about this is.

mdawg
  • 49
  • 5
  • 3
    We hate pictures. They're gross. Please provide a [mcve]. – cs95 Jun 20 '18 at 02:04
  • Poker hand evaluation algorithms typically return a single integer that classifies the hand into one of the 7462 hand values that is easy to compare and sort. Converting that into text for display is a separate operation. Text is for humans. Computers use numbers. – Lee Daniel Crocker Jun 27 '18 at 18:29

1 Answers1

1

That is a DataFrame, not a Series. Try

df.loc[4, 2]

Your second question is more complicated, and might warrant its own SO question. Please post code instead of images!

Peter Leimbigler
  • 10,775
  • 1
  • 23
  • 37