-[and much more...](https://ipython.readthedocs.io/en/stable/interactive/magics.html)
The next generation is already out: [jupyterlab](https://jupyterlab.readthedocs.io/en/latest/)
There are many [useful extensions available](https://github.com/ipython-contrib/jupyter_contrib_nbextensions).
## [Pandas](https://pandas.pydata.org/): Analyzing "clean" data
...
...
@@ -78,11 +112,11 @@ Pandas has excellent support for:
- fast IO to many tabular formats
- accurate handling of missing data
- Many, many routines to handle data
- group by categorical data (i.e., male/female, or age groups)
- joining/merging data
- group by categorical data (e.g., male/female)
- joining/merging data (all SQL-like operations and much more)
- time series support
- statistical models through [statsmodels](http://www.statsmodels.org/stable/index.html)
- plotting though seaborn [seaborn](https://seaborn.pydata.org/)
- plotting though [seaborn](https://seaborn.pydata.org/)
- Use [dask](https://dask.pydata.org/en/latest/) if your data is too big for memory (or if you want to run in parallel)
You should also install `numexpr` and `bottleneck` for optimal performance.
...
...
@@ -341,7 +375,6 @@ The [nipy](http://nipy.org/) ecosystem covers most of these.
-[wxpython](https://www.wxpython.org/): Wrapper around the C++ wxWidgets library
```
%%writefile wx_hello_world.py
#!/usr/bin/env python
"""
Hello World, but with more meat.
"""
...
...
@@ -443,7 +476,7 @@ if __name__ == '__main__':
```
```
%run wx_hello_world.py
!python.app wx_hello_world.py
```
## Machine learning
...
...
@@ -572,7 +605,29 @@ Linters check the code for any syntax errors, [style errors](https://www.python.
-[pylint](https://pypi.python.org/pypi/pylint): most extensive linter
-[pyflake](https://pypi.python.org/pypi/pyflakes): if you think pylint is too strict
-[pep8](https://pypi.python.org/pypi/pep8): just checks for style errors
-[mypy](http://mypy-lang.org/): adding explicit typing to python
### Static typing
Optional static typing:
- Document how your method/function should be called
- Static checking of whether your type hints are still up to date
- Static checking of whether you call your own function correctly
- Even if you don't assign types yourself, static type checking can still check whether you call typed functions/methods from other packages correctly.
```
from typing import List
def greet_all(names: List[str]) -> None:
for name in names:
print('Hello, {}'.format(name))
greet_all(['python', 'ruby']) # type checker will be fine with this
greet_all('some name') # this will actually run fine, but type checker will raise an error
```
Packages to use this:
-[typing](https://docs.python.org/3/library/typing.html): built-in library containing generics, unions, etc.
-[mypy](http://mypy-lang.org/): linter doing static type checking
-[pyAnnotate](https://github.com/dropbox/pyannotate): automatically assign types to most of your functions/methods based on runtime
## Web frameworks
-[Django2](https://www.djangoproject.com/): includes the most features, but also forces you to do things their way
...
...
@@ -588,8 +643,6 @@ There are also many, many libraries to interact with databases, but you will hav