|
57 | 57 | },
|
58 | 58 | {
|
59 | 59 | "cell_type": "code",
|
60 |
| - "execution_count": 2, |
| 60 | + "execution_count": null, |
61 | 61 | "id": "1df8e5d3-c62e-4c35-993c-765a48d25444",
|
62 | 62 | "metadata": {},
|
63 | 63 | "outputs": [],
|
|
86 | 86 | "text": [
|
87 | 87 | "[\n",
|
88 | 88 | " {\n",
|
89 |
| - " \"command\": \"pip install sklearn\",\n", |
| 89 | + " \"command\": \"pip install pandas==1.5.3\",\n", |
| 90 | + " \"step\": \"install pandas\"\n", |
| 91 | + " },\n", |
| 92 | + " {\n", |
| 93 | + " \"command\": \"pip install sklearn==0.23.1\",\n", |
90 | 94 | " \"step\": \"install sklearn\"\n",
|
91 | 95 | " },\n",
|
92 | 96 | " {\n",
|
93 | 97 | " \"command\": \"pip install numpy==1.23.5\",\n",
|
94 | 98 | " \"step\": \"install numpy\"\n",
|
95 |
| - " },\n", |
96 |
| - " {\n", |
97 |
| - " \"command\": \"pip install pandas==1.5.3\",\n", |
98 |
| - " \"step\": \"install pandas\"\n", |
99 | 99 | " }\n",
|
100 | 100 | "]\n"
|
101 | 101 | ]
|
|
118 | 118 | },
|
119 | 119 | {
|
120 | 120 | "cell_type": "code",
|
121 |
| - "execution_count": 4, |
| 121 | + "execution_count": 6, |
122 | 122 | "id": "49721dc9-38e2-4d63-86e1-6555b364f4d6",
|
123 | 123 | "metadata": {},
|
124 | 124 | "outputs": [
|
|
128 | 128 | "text": [
|
129 | 129 | "[\n",
|
130 | 130 | " {\n",
|
131 |
| - " \"command\": \"pip install scikit-learn==1.2.0\",\n", |
| 131 | + " \"command\": \"pip install pandas==1.5.3\",\n", |
| 132 | + " \"step\": \"install pandas\"\n", |
| 133 | + " },\n", |
| 134 | + " {\n", |
| 135 | + " \"command\": \"pip install scikit-learn==0.23.1\",\n", |
132 | 136 | " \"step\": \"install scikit-learn\"\n",
|
133 | 137 | " },\n",
|
134 | 138 | " {\n",
|
135 | 139 | " \"command\": \"pip install numpy==1.23.5\",\n",
|
136 | 140 | " \"step\": \"install numpy\"\n",
|
137 |
| - " },\n", |
138 |
| - " {\n", |
139 |
| - " \"command\": \"pip install pandas==1.5.3\",\n", |
140 |
| - " \"step\": \"install pandas\"\n", |
141 | 141 | " }\n",
|
142 | 142 | "]\n"
|
143 | 143 | ]
|
144 | 144 | }
|
145 | 145 | ],
|
146 | 146 | "source": [
|
147 |
| - "scikit_learn_install = {\n", |
148 |
| - " \"command\": \"pip install scikit-learn==1.2.0\",\n", |
149 |
| - " \"step\": \"install scikit-learn\"\n", |
150 |
| - "}\n", |
151 |
| - "requirements_json[0].update(scikit_learn_install)\n", |
| 147 | + "for requirement in requirements_json:\n", |
| 148 | + " if 'sklearn' in requirement['step']:\n", |
| 149 | + " requirement['command'] = requirement[\"command\"].replace('sklearn', 'scikit-learn')\n", |
| 150 | + " requirement['step'] = requirement['step'].replace('sklearn', 'scikit-learn')\n", |
| 151 | + "\n", |
152 | 152 | "print(json.dumps(requirements_json, sort_keys=True, indent=4))"
|
153 | 153 | ]
|
154 | 154 | },
|
|
174 | 174 | ],
|
175 | 175 | "metadata": {
|
176 | 176 | "kernelspec": {
|
177 |
| - "display_name": "dev-py38", |
| 177 | + "display_name": "yeehaw", |
178 | 178 | "language": "python",
|
179 |
| - "name": "dev-py38" |
| 179 | + "name": "python3" |
180 | 180 | },
|
181 | 181 | "language_info": {
|
182 | 182 | "codemirror_mode": {
|
|
0 commit comments