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

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 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 *} Step by step Kaggle competition tutorial – Datanice Kaggle is a Data Science community where thousands of Data Scientists compete to solve complex data problems. In this article we are going to see how to go through a Kaggle competition step by step. The contest explored here is the San Francisco Crime Classification contest. The goal is to classify a crime occurrence knowing the time and place it happened. Here, the objectives are fixed by Kaggle. In general, when starting a Data Science project, one of the most important steps is the business understanding and the definition of the scope and objectives of the project. Python Numpy Tutorial This tutorial was contributed by Justin Johnson. We will use the Python programming language for all assignments in this course. Python is a great general-purpose programming language on its own, but with the help of a few popular libraries (numpy, scipy, matplotlib) it becomes a powerful environment for scientific computing. We expect that many of you will have some experience with Python and numpy; for the rest of you, this section will serve as a quick crash course both on the Python programming language and on the use of Python for scientific computing. Some of you may have previous knowledge in Matlab, in which case we also recommend the numpy for Matlab users page. You can also find an IPython notebook version of this tutorial here created by Volodymyr Kuleshov and Isaac Caswell for CS 228.

episkills by cmrivers The lessons posted here are from an in-person course I taught in the fall of 2015. I have developed these materials into something more conducive to self-study at Getting started I recommend using Enthought Canopy to install Python.