95 lines
2.2 KiB
Plaintext
95 lines
2.2 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"import csv\n",
|
|
"import Datenbank"
|
|
],
|
|
"id": "9317c939b4662e39",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Hier werden die Nutzereingaben vorgenommen:\n",
|
|
"pfad_datenbank = r\"C:\\Users\\fabia\\OneDrive\\Jade HS\\Master\\MGW2\\Masterprojekt_allgemein\\Masterprojekt\\Programmierung\\Campusnetz\\Campusnetz.db\""
|
|
],
|
|
"id": "33969d88a569b138",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Es wird geprüft, ob die .db-Datei bereits vorhanden ist. Wenn dies nicht der Fall ist, wird die Datenbank mitsamt aller Tabellen angelegt.\n",
|
|
"Datenbank.Datenbank_anlegen(pfad_datenbank)"
|
|
],
|
|
"id": "c55d4c3fccfa7902",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {
|
|
"collapsed": true
|
|
},
|
|
"cell_type": "code",
|
|
"source": "pfad = r\"C:\\Users\\fabia\\OneDrive\\Jade HS\\Master\\MGW2\\Masterprojekt_allgemein\\Masterprojekt\\Übungsnetz\\Tachymeterdaten\\Masterprobe_2.csv\"",
|
|
"id": "bb3d08220dbf2071",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"with open (pfad, newline='', encoding='utf-8') as csvfile:\n",
|
|
" r = csv.reader(csvfile, delimiter=';')\n",
|
|
" zeilennummer = 0\n",
|
|
" for row in r:\n",
|
|
" zeilennummer += 1\n",
|
|
" if zeilennummer < 4:\n",
|
|
" pass\n",
|
|
" else:\n",
|
|
" print(row)\n"
|
|
],
|
|
"id": "c76a1830f3bbe81a",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"source": "",
|
|
"id": "d200a8b43e3646c",
|
|
"outputs": [],
|
|
"execution_count": null
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 2
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython2",
|
|
"version": "2.7.6"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|