background preloader

28 Jupyter Notebook tips, tricks and shortcuts

If you want to set this behaviour for all instances of Jupyter (Notebook and Console), simply create a file ~/.ipython/profile_default/ with the lines below. 3. Easy links to documentation Inside the Help menu you’ll find handy links to the online documentation for common libraries including NumPy, Pandas, SciPy and Matplotlib. Don’t forget also that by prepending a library, method or variable with ?, you can access the Docstring for quick reference on syntax. 4. There are many options for generating plots in your notebooks. matplotlib (the de-facto standard), activated with %matplotlib inline – Here’s a Dataquest Matplotlib Tutorial. The Jupyter interface. 5. The %matplotlib inline you saw above was an example of a IPython Magic command. # This will list all magic commands%lsmagic I recommend browsing the documentation for all IPython Magic commands as you’ll no doubt find some that work for you. 6. env: OMP_NUM_THREADS=4 7. 8. # Before Running%load . # After Running# %load . ! !

Related:  Dataviz - PythonPythonJupyter

Advanced Jupyter Notebook Tricks — Part I - Data Science Blog by Domino I love Jupyter notebooks! They’re great for experimenting with new ideas or data sets, and although my notebook “playgrounds” start out as a mess, I use them to crystallize a clear idea for building my final projects. Jupyter is so great for interactive exploratory analysis that it’s easy to overlook some of its other powerful features and use cases. A Whirlwind Tour of Python This website contains the full text of my free O'Reilly report, A Whirlwind Tour of Python. A Whirlwind Tour of Python is a fast-paced introduction to essential features of the Python language, aimed at researchers and developers who are already familiar with programming in another language. The material is particularly designed for those who wish to use Python for data science and/or scientific programming, and in this capacity serves as an introduction to my longer book, The Python Data Science Handbook. The content is also available on Github in the form of Jupyter Notebooks, or from O'Reilly site as a free e-book or free pdf. This material is released under the "No Rights Reserved" CC0 license, and thus you are free to re-use, modify, build-on, and enhance this material for any purpose.

Getting Started with Plotly for Python Plotly for Python can be configured to render locally inside Jupyter (IPython) notebooks, locally inside your web browser, or remotely in your online Plotly account. Remote hosting on Plotly is free for public use. For private use, view our paid plans. Offline Use Standalone HTML

Save and Load Machine Learning Models in Python with scikit-learn Finding an accurate machine learning model is not the end of the project. In this post you will discover how to save and load your machine learning model in Python using scikit-learn. This allows you to save your model to file and load it later in order to make predictions. How to Generate FiveThirtyEight Graphs in Python If you read data science articles, you may have already stumbled upon FiveThirtyEight's content. Naturally, you were impressed by their awesome visualizations. You wanted to make your own awesome visualizations and so asked Quora and Reddit how to do it.

color example code: — Matplotlib 2.0.2 documentation (Source code) """==================Colormap reference================== Reference for colormaps included with Matplotlib. This reference example shows all colormaps included with Matplotlib. Note thatany colormap listed here can be reversed by appending "_r" (e.g., "pink_r").These colormaps are divided into the following categories: Sequential: These colormaps are approximately monochromatic colormaps varying smoothly between two color tones---usually from low saturation (e.g. white) to high saturation (e.g. a bright blue). Sequential colormaps are ideal for representing most scientific data since they show a clear progression from low-to-high values.

Interactive Plotting in IPython Notebook (Part 1/2): Bokeh Summary In this post I will talk about interactive plotting packages that support the IPython Notebook and allow you to zoom, pan, resize, or even hover and get values off your plots directly from an IPython Notebook. This post will focus on Bokeh while the next post will be about Plotly. I will also provide some very rudimentary examples that should allow to get started straight away. Interactive Plots: +1 for convenience Docker: Data Science Environment with Jupyter At Dataquest, we provide an easy to use environment to start learning data science. This environment comes preconfigured with the latest version of Python, well known data science libraries, and a runnable code editor. It allows brand new data scientists, and experienced ones, to start running code right away.

Visualizing Summer Travels - Geoff Boeing This is a series of posts about visualizing spatial data. I spent a couple of months traveling in Europe this summer and collected GPS location data throughout the trip with the OpenPaths app. I explored different web mapping technologies such as CartoDB, Leaflet, Mapbox, and Tilemill to plot my travels. I also used Python and matplotlib to run some descriptive statistics and visualize other aspects of my trip. Here is the series of posts: My Python code is available in this GitHub repo. Packaging a python library Note This is about packaging libraries, not applications. All the advice here is implemented in a project template (with full support for C extensions): cookiecutter-pylibrary (introduction). I think the packaging best practices should be revisited, there are lots of good tools now-days that are either unused or underused. It's generally a good thing to re-evaluate best practices all the time.

Data visualization with Seaborn Welcome back. Please sign in. Welcome back. {* #userInformationForm *} {* traditionalSignIn_emailAddress *} {* traditionalSignIn_password *} Python Machine Learning: Scikit-Learn Tutorial (Article) Machine learning is a branch in computer science that studies the design of algorithms that can learn. Typical tasks are concept learning, function learning or “predictive modeling”, clustering and finding predictive patterns. These tasks are learned through available data that were observed through experiences or instructions, for example. The hope that comes with this discipline is that including the experience into its tasks will eventually improve the learning. But this improvement needs to happen in such a way that the learning itself becomes automatic so that humans like ourselves don’t need to interfere anymore is the ultimate goal. If you’re more interested in an R tutorial, take a look at our Machine Learning with R for Beginners tutorial.