mirror of
https://github.com/alanorth/safari-bingo-cards.git
synced 2024-11-21 14:25:03 +01:00
generate.py: log after action
I saw some advice once that we should log after the action completes instead of before. Let's at least be consistent.
This commit is contained in:
parent
ef3dcd432f
commit
00ab133921
@ -155,8 +155,8 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# Get a random list of animal IDs. We will build a square grid using the
|
# Get a random list of animal IDs. We will build a square grid using the
|
||||||
# "across" parameter passed by the user.
|
# "across" parameter passed by the user.
|
||||||
logger.info(f"Generating random sample of {animals_df.shape[0]} animals...")
|
|
||||||
animal_ids = animals_df["id"].sample(args.across * args.across)
|
animal_ids = animals_df["id"].sample(args.across * args.across)
|
||||||
|
logger.info(f"Generated random sample of {animals_df.shape[0]} animals...")
|
||||||
|
|
||||||
# Slice those random animals from the dataframe
|
# Slice those random animals from the dataframe
|
||||||
animals_df_random = animals_df[animals_df["id"].isin(animal_ids)]
|
animals_df_random = animals_df[animals_df["id"].isin(animal_ids)]
|
||||||
|
Loading…
Reference in New Issue
Block a user