From 7f46611a1909eeb83fec80940acd4239f2c0bbf7 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 21 Nov 2023 15:12:21 +0000 Subject: [PATCH] =?UTF-8?q?Telefonliste.ipynb=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Telefonliste.ipynb | 119 --------------------------------------------- 1 file changed, 119 deletions(-) delete mode 100644 Telefonliste.ipynb diff --git a/Telefonliste.ipynb b/Telefonliste.ipynb deleted file mode 100644 index dc1ac49..0000000 --- a/Telefonliste.ipynb +++ /dev/null @@ -1,119 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "1a1e8e6c-9ee8-432b-9436-bd60fa685b36", - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "import numpy as np\n", - "import pandas as pd" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "3521f43d-a20d-42c1-9d04-b8e91ee97f40", - "metadata": {}, - "outputs": [], - "source": [ - "path_to_list = r\"C:\\Users\\a.jurcenko\\Desktop\\aj\\Jupyter\\Telefonliste\\phonebookExport.csv\"\n", - "save_path = r\"C:\\Users\\a.jurcenko\\Desktop\\aj\\Jupyter\\Telefonliste\\phonebookExport.vcf\"" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "28c03b34-577f-4dca-a266-8e39ab0d4970", - "metadata": {}, - "outputs": [], - "source": [ - "df_all = pd.read_csv(path_to_list, converters={'Nummer': str})" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "e34fcf4c-f270-4198-afd8-f6174de52012", - "metadata": {}, - "outputs": [], - "source": [ - "df_all.drop(columns=['Unnamed: 2'], inplace=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "701e7240-1b03-4731-9521-3beb48ba93b4", - "metadata": {}, - "outputs": [], - "source": [ - "cell_list = list()\n", - "for i, row in df_all.iterrows():\n", - " card = \"BEGIN:VCARD\\nVERSION:2.1\\nN:;\"+row['Name']+\";;;\\nFN:\"+row['Name']+\"\\nTEL;CELL;PREF:\"+row['Nummer']+\"\\nEND:VCARD\\n\"\n", - " cell_list.append(card)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "c99980cf-e8a7-492e-bfd6-b3c585e6e87c", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['BEGIN:VCARD\\nVERSION:2.1\\nN:;Dispo Schwindegg;;;\\nFN:Dispo Schwindegg\\nTEL;CELL;PREF:+49808293020\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Max Greilmeier;;;\\nFN:Max Greilmeier\\nTEL;CELL;PREF:+498082930213\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Aigner Bernhard;;;\\nFN:Aigner Bernhard\\nTEL;CELL;PREF:+498082930214\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Granig Florian;;;\\nFN:Granig Florian\\nTEL;CELL;PREF:+498082930212\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Laubsch Torsten;;;\\nFN:Laubsch Torsten\\nTEL;CELL;PREF:+498082930221\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Lehmann Thoralf - Fuhrparkleiter;;;\\nFN:Lehmann Thoralf - Fuhrparkleiter\\nTEL;CELL;PREF:+498082930243\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Temel Adem - Werkstattleiter;;;\\nFN:Temel Adem - Werkstattleiter\\nTEL;CELL;PREF:+498082930223\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Koziol Werner - IT;;;\\nFN:Koziol Werner - IT\\nTEL;CELL;PREF:+498082930227\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Kravag - Unfall/Bergung;;;\\nFN:Kravag - Unfall/Bergung\\nTEL;CELL;PREF:+4961116750419\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Orzuev Viktor - Meat & Fresh;;;\\nFN:Orzuev Viktor - Meat & Fresh\\nTEL;CELL;PREF:+4986389511310\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Sözen Esra - Personalabteilung;;;\\nFN:Sözen Esra - Personalabteilung\\nTEL;CELL;PREF:+498082930219\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Tomm Xenia - Palettenabteilung;;;\\nFN:Tomm Xenia - Palettenabteilung\\nTEL;CELL;PREF:+498082930216\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Jenny Späth;;;\\nFN:Jenny Späth\\nTEL;CELL;PREF:+498082930218\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Luca Uliczka;;;\\nFN:Luca Uliczka\\nTEL;CELL;PREF:+498082930241\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Jurcenko Alexander - IT;;;\\nFN:Jurcenko Alexander - IT\\nTEL;CELL;PREF:+498082930244\\nEND:VCARD\\n', 'BEGIN:VCARD\\nVERSION:2.1\\nN:;Michael Kalteis - Service Schwindegg;;;\\nFN:Michael Kalteis - Service Schwindegg\\nTEL;CELL;PREF:+498082930242\\nEND:VCARD\\n']\n" - ] - } - ], - "source": [ - "print(cell_list)" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "id": "1a4d8a3c-02dc-4e52-9fb7-d2097240171a", - "metadata": {}, - "outputs": [], - "source": [ - "with open(save_path, 'w', encoding='UTF-8') as file:\n", - " for c in cell_list:\n", - " file.write(c)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "00548ece-242e-41ed-bc1a-9ece667034f4", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "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.11.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}