Alejandro Cremades commited on
Commit
41aa31c
1 Parent(s): a2b0713

Found 7 more cards in boxed sets

Browse files
middleschool-cardlist.ipynb CHANGED
@@ -34,7 +34,7 @@
34
  },
35
  {
36
  "cell_type": "code",
37
- "execution_count": 2,
38
  "metadata": {},
39
  "outputs": [],
40
  "source": [
@@ -42,7 +42,7 @@
42
  " 'WTH', 'POR', 'TMP', 'STH', 'EXO', 'P02', 'USG', 'ULG',\n",
43
  " '6ED', 'UDS', 'PTK', 'S99', 'MMQ', 'NEM', 'PCY', 'S00',\n",
44
  " 'INV', 'PLS', '7ED', 'APC', 'ODY', 'TOR', 'JUD', 'ONS',\n",
45
- " 'LGN', 'SCG', 'PDRC', 'PHPR']\n",
46
  "for set in setlist:\n",
47
  " command = 'cat data/AllPrintings.json | jq \\'.data.\\\"' + \\\n",
48
  " set + '\\\".cards\\' > data/set_' + set + '.json'\n",
@@ -58,7 +58,7 @@
58
  },
59
  {
60
  "cell_type": "code",
61
- "execution_count": 9,
62
  "metadata": {},
63
  "outputs": [],
64
  "source": [
@@ -75,14 +75,19 @@
75
  },
76
  {
77
  "cell_type": "code",
78
- "execution_count": 12,
79
  "metadata": {},
80
  "outputs": [
81
  {
82
  "name": "stdout",
83
  "output_type": "stream",
84
  "text": [
85
- "5793 cards found\n",
 
 
 
 
 
86
  " oracle_id name name_ja\n",
87
  "0 8adbba6e-03ef-4278-aec5-8a4496b377a8 Abandon Hope 断念\n",
88
  "0 5a70ccfa-d12d-4e62-a1a4-f05cda2fd442 Abandoned Outpost 見捨てられた前哨地\n",
@@ -123,8 +128,10 @@
123
  " })\n",
124
  " middleschool_df = pd.concat([middleschool_df, temporary_df])\n",
125
  "\n",
 
 
126
  "middleschool_df = middleschool_df.drop_duplicates(subset=['oracle_id'])\n",
127
- "middleschool_df = middleschool_df.sort_values(by='name')\n",
128
  "print(middleschool_df.shape[0], 'cards found')\n",
129
  "print(middleschool_df.head())\n",
130
  "print(middleschool_df.tail())\n"
@@ -139,16 +146,24 @@
139
  },
140
  {
141
  "cell_type": "code",
142
- "execution_count": 13,
143
  "metadata": {},
144
  "outputs": [
145
  {
146
  "name": "stdout",
147
  "output_type": "stream",
148
  "text": [
149
- "Cards legal by set: 5793\n",
150
  "Banned cards: 26\n",
151
- "Cards legal by set and not banned: 5767\n"
 
 
 
 
 
 
 
 
152
  ]
153
  }
154
  ],
@@ -199,7 +214,7 @@
199
  },
200
  {
201
  "cell_type": "code",
202
- "execution_count": 14,
203
  "metadata": {},
204
  "outputs": [],
205
  "source": [
@@ -217,7 +232,7 @@
217
  ],
218
  "metadata": {
219
  "kernelspec": {
220
- "display_name": "Python 3.9.12 64-bit",
221
  "language": "python",
222
  "name": "python3"
223
  },
@@ -231,7 +246,7 @@
231
  "name": "python",
232
  "nbconvert_exporter": "python",
233
  "pygments_lexer": "ipython3",
234
- "version": "3.9.12"
235
  },
236
  "orig_nbformat": 4,
237
  "vscode": {
 
34
  },
35
  {
36
  "cell_type": "code",
37
+ "execution_count": 1,
38
  "metadata": {},
39
  "outputs": [],
40
  "source": [
 
42
  " 'WTH', 'POR', 'TMP', 'STH', 'EXO', 'P02', 'USG', 'ULG',\n",
43
  " '6ED', 'UDS', 'PTK', 'S99', 'MMQ', 'NEM', 'PCY', 'S00',\n",
44
  " 'INV', 'PLS', '7ED', 'APC', 'ODY', 'TOR', 'JUD', 'ONS',\n",
45
+ " 'LGN', 'SCG', 'PDRC', 'PHPR', 'ATH', 'BRB', 'BTD', 'DKM']\n",
46
  "for set in setlist:\n",
47
  " command = 'cat data/AllPrintings.json | jq \\'.data.\\\"' + \\\n",
48
  " set + '\\\".cards\\' > data/set_' + set + '.json'\n",
 
58
  },
59
  {
60
  "cell_type": "code",
61
+ "execution_count": 2,
62
  "metadata": {},
63
  "outputs": [],
64
  "source": [
 
75
  },
76
  {
77
  "cell_type": "code",
78
+ "execution_count": 13,
79
  "metadata": {},
80
  "outputs": [
81
  {
82
  "name": "stdout",
83
  "output_type": "stream",
84
  "text": [
85
+ " oracle_id name name_ja\n",
86
+ "0 5acc8b39-3c3e-4012-8cfd-ac3c2c4ca982 Arc Lightning 弧状の稲妻\n",
87
+ "0 5acc8b39-3c3e-4012-8cfd-ac3c2c4ca982 Arc Lightning None\n",
88
+ " oracle_id name name_ja\n",
89
+ "0 5acc8b39-3c3e-4012-8cfd-ac3c2c4ca982 Arc Lightning 弧状の稲妻\n",
90
+ "5800 cards found\n",
91
  " oracle_id name name_ja\n",
92
  "0 8adbba6e-03ef-4278-aec5-8a4496b377a8 Abandon Hope 断念\n",
93
  "0 5a70ccfa-d12d-4e62-a1a4-f05cda2fd442 Abandoned Outpost 見捨てられた前哨地\n",
 
128
  " })\n",
129
  " middleschool_df = pd.concat([middleschool_df, temporary_df])\n",
130
  "\n",
131
+ "middleschool_df = middleschool_df.sort_values(by=['name', 'name_ja'])\n",
132
+ "print(middleschool_df[middleschool_df['name'] == 'Arc Lightning'])\n",
133
  "middleschool_df = middleschool_df.drop_duplicates(subset=['oracle_id'])\n",
134
+ "print(middleschool_df[middleschool_df['name'] == 'Arc Lightning'])\n",
135
  "print(middleschool_df.shape[0], 'cards found')\n",
136
  "print(middleschool_df.head())\n",
137
  "print(middleschool_df.tail())\n"
 
146
  },
147
  {
148
  "cell_type": "code",
149
+ "execution_count": 14,
150
  "metadata": {},
151
  "outputs": [
152
  {
153
  "name": "stdout",
154
  "output_type": "stream",
155
  "text": [
156
+ "Cards legal by set: 5800\n",
157
  "Banned cards: 26\n",
158
+ "Cards legal by set and not banned: 5774\n"
159
+ ]
160
+ },
161
+ {
162
+ "name": "stderr",
163
+ "output_type": "stream",
164
+ "text": [
165
+ "/var/folders/jc/cq3r6hh554b4k01f90f6f2jm0000gn/T/ipykernel_28564/1478117800.py:29: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.\n",
166
+ " middleschool_df.name.tolist()).isin(banlist).any(1).values]\n"
167
  ]
168
  }
169
  ],
 
214
  },
215
  {
216
  "cell_type": "code",
217
+ "execution_count": 15,
218
  "metadata": {},
219
  "outputs": [],
220
  "source": [
 
232
  ],
233
  "metadata": {
234
  "kernelspec": {
235
+ "display_name": "Python 3",
236
  "language": "python",
237
  "name": "python3"
238
  },
 
246
  "name": "python",
247
  "nbconvert_exporter": "python",
248
  "pygments_lexer": "ipython3",
249
+ "version": "3.10.8"
250
  },
251
  "orig_nbformat": 4,
252
  "vscode": {
output/middleschool.csv CHANGED
The diff for this file is too large to render. See raw diff
 
output/middleschool.json CHANGED
The diff for this file is too large to render. See raw diff