PyDLR32
Python - die Alternative zu Matlab? http://num.math.uni-goettingen.de/~schulz/data/python_talk.pdf
PyDLR31
# UnboundLocalError: local variable 'D' referenced before assignment # Python Introductory Course 8.-10. April 2019 # Python 3.7 D = {} def foo(): if False: D = {} D["blue"] = "blau" print("D local:", D) return D D = foo() print(D) # shorter: # 1. Line '*' commented out: NameError: name 'D' is not defined # 2. With line '*': UnboundLocalError: local variable 'D' referenced before assignment # 3. With 'if True': works def g(): if False: D = {} # (*) print(D) g()
Explanation:
PyDLR23
Switch/Case with Python
def a(): print("'a' was called") def b(): print("'b' was called") def c(): print("'c' was called") D = { 'a' : a, 'b' : b, 'c' : c} while True: s = input("your choice: ") if s in D: D[s]() else: break
PyDLR22
Python 3
Jake VanderPlas, A Whirlwind Tour of Python (freier Text mit 100 Seiten plus Jupyter Notebooks)
Kevin Sheppard, Python for Econometrics, 2017
SciPy
http://www.scipy-lectures.org (inkl. Datensaetzen und Aufgaben)
Matplotlib Gallery (viele Beispiele mit Sourcecode)
Hans Petter Langtangen, A very basic introduction to scientific Python programming, 2016
Svein Linge, Hans Petter Langtangen, Programming for Computations - Python A Gentle Introduction to Numerical Simulations with Python, 2016 (Open Access)
Pandas
Pandas Homepage, siehe 10 Minutes to Pandas, Tutorials, Lessons for new Pandas users, ...
Beispiele aus dem Netz, leicht modifiziert. U.a. Excel Writer, Pandas Reader, Pandas Zeitserie, Numpy: Textdateien einlesen, ...
Karlijn Willems, Pandas Tutorial: DataFrames in Python, October 2016
https://www.datacamp.com/community/tutorials/pandas-tutorial-dataframe-python
Wes McKinney, Python for Data Analysis, O'Reilly 2013.
Cheat sheets