Spaces:
Running
Running
Alejandro Cremades
commited on
Commit
•
e9812fa
1
Parent(s):
b95b32f
Let the user know how many illegal cards there are on the list
Browse files
pages/1_Check_Card_List.py
CHANGED
@@ -40,9 +40,14 @@ input_cards["legalnames"] = input_cards["cardname"].apply(
|
|
40 |
)
|
41 |
input_cards = input_cards.apply(lib.split_names_list, axis=1)
|
42 |
input_cards = input_cards.apply(lib.legal_to_checkmark, axis=1)
|
43 |
-
|
|
|
44 |
|
45 |
-
|
|
|
|
|
|
|
|
|
46 |
if "English" in input_cards and "日本語" in input_cards:
|
47 |
col2.dataframe(
|
48 |
input_cards[["Legal", "English", "日本語"]],
|
|
|
40 |
)
|
41 |
input_cards = input_cards.apply(lib.split_names_list, axis=1)
|
42 |
input_cards = input_cards.apply(lib.legal_to_checkmark, axis=1)
|
43 |
+
if input_cards.shape[0] > 0:
|
44 |
+
input_cards = input_cards.sort_values(by="Legal", ascending=False)
|
45 |
|
46 |
+
illegal_cards = 0
|
47 |
+
if input_cards.shape[0] > 0:
|
48 |
+
illegal_cards = input_cards[input_cards["Legal"] != "✅"].shape[0]
|
49 |
+
|
50 |
+
col2.write(f"##### This list has {illegal_cards} illegal cards")
|
51 |
if "English" in input_cards and "日本語" in input_cards:
|
52 |
col2.dataframe(
|
53 |
input_cards[["Legal", "English", "日本語"]],
|