Skip to content

Commit 30dfed1

Browse files
drvinceknightmarcharper
authored andcommitted
Add a comment explaining the filtering.
1 parent e10fb4f commit 30dfed1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

axelrod/fingerprint.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,8 @@ def analyse_cooperation_ratio(filename):
484484

485485
cooperation_rates = {}
486486
df = dd.read_csv(filename)
487+
# We ignore the actions of all opponents. So we filter the dataframe to
488+
# only include the results of the player with index `0`.
487489
df = df[df["Player index"] == 0][["Opponent index", "Actions"]]
488490

489491
for _, row in df.iterrows():

0 commit comments

Comments
 (0)