diff --git a/.gitignore b/.gitignore index 73003a7..b84c35a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # --> Temporary files +_build privat temp *.swp diff --git a/.hgignore b/.hgignore index dc4a0cc..3ac02fc 100644 --- a/.hgignore +++ b/.hgignore @@ -2,6 +2,7 @@ syntax: regexp .git/ privat/ +_build # ### Project independed ### syntax: glob diff --git a/jupyter_book/04_pandas.ipynb b/jupyter_book/04_pandas.ipynb index 523c4a9..6ec9b5d 100644 --- a/jupyter_book/04_pandas.ipynb +++ b/jupyter_book/04_pandas.ipynb @@ -40,28 +40,9 @@ "## Hinweis\n", "\n", "Bei den folgenden Beispielen wird die Datei `car.csv` benötigt.\n", - "Diese findet sich [hier](https://gist.githubusercontent.com/cgiess/58f995bf88cd0e2269b634c7970eb479/raw/2de29b036ead1eabc402301e934b82e8f674aaf4/car.csv). Diese Datei muss auf den Jupyter-Rechner liegen. In der Regel kann man dies mittels `Upload Files` erreichen.\n", + "Diese findet sich [in Moodle](https://moodle.hs-mannheim.de/course/view.php?id=4533). Diese Datei muss auf den Jupyter-Rechner liegen. Dazu muss die Datei mittels `Upload Files` hochgeladen werden.\n", "\n", - "![upload_file.png](upload_file.png)\n", - "\n", - "\n", - "Das `Upload Files` funktioniert aber bei https://jupyter.org/try-jupyter/lab/ nicht. Hier muss die Datei wie folgt bereitsgestellt werden (Stand Mai 2022):\n", - "\n", - "\n", - "```\n", - "from js import fetch\n", - "res = await fetch('https://gist.githubusercontent.com/cgiess/58f995bf88cd0e2269b634c7970eb479/raw/2de29b036ead1eabc402301e934b82e8f674aaf4/car.csv')\n", - "text = await res.text()\n", - "with open('car.csv', 'w') as f:\n", - " f.write(text)\n", - "\n", - "import os\n", - "os.listdir()\n", - "```\n", - "\n", - "Als Ergebnis sollte eine Liste mit Dateienamen angezeigt werden in der `car.csv` enthalten ist, z.B.:\n", - "\n", - "`['.matplotlib', '.ipython', 'car.csv']`" + "![upload_file.png](upload_file.png)\n" ] }, { @@ -235,7 +216,7 @@ } ], "source": [ - "d = pandas.read_csv(\"file:car.csv\", sep=\"\\t\")\n", + "d = pandas.read_csv(\"car.csv\", sep=\"\\t\")\n", "d" ] }, @@ -254,7 +235,7 @@ "metadata": {}, "outputs": [], "source": [ - "d = pandas.read_csv('file:car.csv', sep='\\t', parse_dates=['Datum'])" + "d = pandas.read_csv('car.csv', sep='\\t', parse_dates=['Datum'])" ] }, { diff --git a/jupyter_book/05_pandas_visu.ipynb b/jupyter_book/05_pandas_visu.ipynb index aa610aa..995065d 100644 --- a/jupyter_book/05_pandas_visu.ipynb +++ b/jupyter_book/05_pandas_visu.ipynb @@ -26,7 +26,7 @@ "outputs": [], "source": [ "import pandas\n", - "d = pandas.read_csv('file:car.csv', sep='\\t', parse_dates=['Datum'])\n", + "d = pandas.read_csv('car.csv', sep='\\t', parse_dates=['Datum'])\n", "fuel_only = d[d[\"Typ\"] == \"Benzin\"]" ] }, diff --git a/jupyter_book/Makefile b/jupyter_book/Makefile index 2674dfc..f27ae7b 100644 --- a/jupyter_book/Makefile +++ b/jupyter_book/Makefile @@ -9,6 +9,8 @@ preprocess: html: preprocess jupyter-book build . pdf: preprocess - jupyter-book build --builder pdflatex . + jupyter-book build --builder latex . + cd _build/latex && sed -i -e 's/letterpaper/a4paper/' -e 's/\(Dr\. Christoph G\)/\\hspace{8.2em}\1/' python_data_science.tex && make && cd ../.. clean: rm -rf _build + diff --git a/jupyter_book/_config.yml b/jupyter_book/_config.yml index 8b94ade..cdc16a3 100644 --- a/jupyter_book/_config.yml +++ b/jupyter_book/_config.yml @@ -3,7 +3,7 @@ title: Data Science mit Python author: MARS – Center for Entrepreneurship email: c.giess@hs-mannheim.de -copyright: "2022" +copyright: "2023" logo: logo_mars.png only_build_toc_files: true @@ -14,9 +14,12 @@ execute: latex: latex_documents: targetname: python_data_science.tex + author: Dr. Christoph Giess \\ MARS – Center for Entrepreneurship + latex_show_urls: inline + latex_show_pagerefs: true sphinx: extra_extensions: - sphinx_jupyterbook_latex config: - language: German + language: de diff --git a/jupyter_book/intro.md b/jupyter_book/intro.md index 747b1a8..19cf5ea 100644 --- a/jupyter_book/intro.md +++ b/jupyter_book/intro.md @@ -16,7 +16,7 @@ und jetzt lernen möchten, wie man Daten mit Hilfe von Python auswerten kann. * Jupyter * https://jupyter.org/try-jupyter/lab/ - * Notebook Pyolite + * Notebook - Python (Pyodide) * Python im Webbrowser * Input-Zeile bedienen * Python Programm (Code) und Dokumentation ([Markdown](https://de.wikipedia.org/wiki/Markdown)) diff --git a/jupyter_book/upload_file.png b/jupyter_book/upload_file.png index 2058464..568b2ef 100644 Binary files a/jupyter_book/upload_file.png and b/jupyter_book/upload_file.png differ diff --git a/python_data_science.pdf b/python_data_science.pdf index 50a1591..b58451e 100644 Binary files a/python_data_science.pdf and b/python_data_science.pdf differ