From 98c40811cd9f0975dc13f283c75e3376711e505f Mon Sep 17 00:00:00 2001 From: Pascal <engelerp@phys.ethz.ch> Date: Mon, 7 Feb 2022 13:54:55 +0100 Subject: [PATCH] Added BOM viewer --- Untitled Folder/BOM viewer.ipynb | 284 +++++++++++++++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 Untitled Folder/BOM viewer.ipynb diff --git a/Untitled Folder/BOM viewer.ipynb b/Untitled Folder/BOM viewer.ipynb new file mode 100644 index 0000000..30c3e11 --- /dev/null +++ b/Untitled Folder/BOM viewer.ipynb @@ -0,0 +1,284 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 7, + "id": "cbfca94c", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import os.path" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "id": "28dcda03", + "metadata": {}, + "outputs": [], + "source": [ + "data = pd.read_csv(\"..\\\\FullBoard\\\\bom.csv\", sep=';', index_col=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "cd984b4c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "<div>\n", + "<style scoped>\n", + " .dataframe tbody tr th:only-of-type {\n", + " vertical-align: middle;\n", + " }\n", + "\n", + " .dataframe tbody tr th {\n", + " vertical-align: top;\n", + " }\n", + "\n", + " .dataframe thead th {\n", + " text-align: right;\n", + " }\n", + "</style>\n", + "<table border=\"1\" class=\"dataframe\">\n", + " <thead>\n", + " <tr style=\"text-align: right;\">\n", + " <th></th>\n", + " <th>Id</th>\n", + " <th>Designator</th>\n", + " <th>Package</th>\n", + " <th>Quantity</th>\n", + " <th>Designation</th>\n", + " <th>Supplier and ref</th>\n", + " <th>Unnamed: 6</th>\n", + " </tr>\n", + " </thead>\n", + " <tbody>\n", + " <tr>\n", + " <th>0</th>\n", + " <td>1</td>\n", + " <td>G***</td>\n", + " <td>logo5</td>\n", + " <td>1</td>\n", + " <td>LOGO</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>1</th>\n", + " <td>2</td>\n", + " <td>S50,S49,S48,S47,S46,S45,S44,S43,S42,S41,S40,S3...</td>\n", + " <td>EE2-5NU</td>\n", + " <td>50</td>\n", + " <td>EE2-5NU-L_EC2-5NU</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>2</th>\n", + " <td>3</td>\n", + " <td>M50,M49,M48,M47,M46,M45,M44,M43,M42,M41,M40,M3...</td>\n", + " <td>NTD3055-DPAK</td>\n", + " <td>50</td>\n", + " <td>NTD3055L170</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>3</th>\n", + " <td>4</td>\n", + " <td>J60,J3</td>\n", + " <td>PinHeader_1x10_P2.54mm_Vertical</td>\n", + " <td>2</td>\n", + " <td>Conn_01x10</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>4</th>\n", + " <td>5</td>\n", + " <td>R150,R149,R148,R147,R146,R135,R134,R133,R132,R...</td>\n", + " <td>R_0805_2012Metric_Pad1.15x1.40mm_HandSolder</td>\n", + " <td>50</td>\n", + " <td>150</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>5</th>\n", + " <td>6</td>\n", + " <td>R145,R144,R143,R142,R141,R130,R129,R128,R127,R...</td>\n", + " <td>R_0805_2012Metric_Pad1.15x1.40mm_HandSolder</td>\n", + " <td>50</td>\n", + " <td>43k</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>6</th>\n", + " <td>7</td>\n", + " <td>R140,R139,R138,R137,R136,R125,R124,R123,R122,R...</td>\n", + " <td>R_0805_2012Metric_Pad1.15x1.40mm_HandSolder</td>\n", + " <td>50</td>\n", + " <td>1.2k</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>7</th>\n", + " <td>8</td>\n", + " <td>J59,J58,J57,J56,J55,J54,J53,J52,J51,J50,J49,J4...</td>\n", + " <td>Connector_01x02_solder</td>\n", + " <td>51</td>\n", + " <td>Conn_01x02</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>8</th>\n", + " <td>9</td>\n", + " <td>J6</td>\n", + " <td>PinHeader_2x18_P2.54mm_Vertical</td>\n", + " <td>1</td>\n", + " <td>Conn_02x18_Odd_Even</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>9</th>\n", + " <td>10</td>\n", + " <td>J5,J4</td>\n", + " <td>PinHeader_1x08_P2.54mm_Vertical</td>\n", + " <td>2</td>\n", + " <td>Conn_01x08</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>10</th>\n", + " <td>11</td>\n", + " <td>D100,D99,D98,D97,D96,D90,D89,D88,D87,D86,D80,D...</td>\n", + " <td>LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder</td>\n", + " <td>50</td>\n", + " <td>LED</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>11</th>\n", + " <td>12</td>\n", + " <td>D95,D94,D93,D92,D91,D85,D84,D83,D82,D81,D75,D7...</td>\n", + " <td>D_DO-41_SOD81_P10.16mm_Horizontal</td>\n", + " <td>50</td>\n", + " <td>DIODE</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " <tr>\n", + " <th>12</th>\n", + " <td>13</td>\n", + " <td>C1</td>\n", + " <td>CP_Radial_D6.3mm_P2.50mm</td>\n", + " <td>1</td>\n", + " <td>10u</td>\n", + " <td>NaN</td>\n", + " <td>NaN</td>\n", + " </tr>\n", + " </tbody>\n", + "</table>\n", + "</div>" + ], + "text/plain": [ + " Id Designator \\\n", + "0 1 G*** \n", + "1 2 S50,S49,S48,S47,S46,S45,S44,S43,S42,S41,S40,S3... \n", + "2 3 M50,M49,M48,M47,M46,M45,M44,M43,M42,M41,M40,M3... \n", + "3 4 J60,J3 \n", + "4 5 R150,R149,R148,R147,R146,R135,R134,R133,R132,R... \n", + "5 6 R145,R144,R143,R142,R141,R130,R129,R128,R127,R... \n", + "6 7 R140,R139,R138,R137,R136,R125,R124,R123,R122,R... \n", + "7 8 J59,J58,J57,J56,J55,J54,J53,J52,J51,J50,J49,J4... \n", + "8 9 J6 \n", + "9 10 J5,J4 \n", + "10 11 D100,D99,D98,D97,D96,D90,D89,D88,D87,D86,D80,D... \n", + "11 12 D95,D94,D93,D92,D91,D85,D84,D83,D82,D81,D75,D7... \n", + "12 13 C1 \n", + "\n", + " Package Quantity \\\n", + "0 logo5 1 \n", + "1 EE2-5NU 50 \n", + "2 NTD3055-DPAK 50 \n", + "3 PinHeader_1x10_P2.54mm_Vertical 2 \n", + "4 R_0805_2012Metric_Pad1.15x1.40mm_HandSolder 50 \n", + "5 R_0805_2012Metric_Pad1.15x1.40mm_HandSolder 50 \n", + "6 R_0805_2012Metric_Pad1.15x1.40mm_HandSolder 50 \n", + "7 Connector_01x02_solder 51 \n", + "8 PinHeader_2x18_P2.54mm_Vertical 1 \n", + "9 PinHeader_1x08_P2.54mm_Vertical 2 \n", + "10 LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder 50 \n", + "11 D_DO-41_SOD81_P10.16mm_Horizontal 50 \n", + "12 CP_Radial_D6.3mm_P2.50mm 1 \n", + "\n", + " Designation Supplier and ref Unnamed: 6 \n", + "0 LOGO NaN NaN \n", + "1 EE2-5NU-L_EC2-5NU NaN NaN \n", + "2 NTD3055L170 NaN NaN \n", + "3 Conn_01x10 NaN NaN \n", + "4 150 NaN NaN \n", + "5 43k NaN NaN \n", + "6 1.2k NaN NaN \n", + "7 Conn_01x02 NaN NaN \n", + "8 Conn_02x18_Odd_Even NaN NaN \n", + "9 Conn_01x08 NaN NaN \n", + "10 LED NaN NaN \n", + "11 DIODE NaN NaN \n", + "12 10u NaN NaN " + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fd1233ab", + "metadata": {}, + "outputs": [], + "source": [ + "#Add links\n", + "data = data.assign(Link=[])" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} -- GitLab