jupyter-notebook

Equation numbering in Jupyter notebooks

会有一股神秘感。 提交于 2019-12-18 12:13:00
问题 The fact is, that in official documentation Jupyter - motivating examples stands Equation numbering and referencing will be available in a future version of the Jupyter notebook. I know there is a lot of discussion about this topic. There are some people who claim to solve this issue with some workarounds. But for ordinary user it is hard to understand the workarounds, or how dirty/useful the hacks really are. So my questions are: what means the "available in future version"? Does it mean

Is it possible to show `print` output as LaTeX in jupyter notebook?

眉间皱痕 提交于 2019-12-18 12:00:54
问题 I was writing a very simple script to count ellipsoid area and volume and some other things. I was presenting my output printing it out like this: print('Dims: {}x{}m\nArea: {}m^2\nVolume: {}m^3'.format(a, round(b,2), P, V)) What, of course, gave this output (with sample data): Dims: 13.49x2.25m Area: 302.99m^2 Volume: 90.92m^3 As I wrote earlier, I am using jupyter notebook, so I can use $ operators in markdown cells to create LaTeX formulas. My question is, is it possible to generate output

list memory usage in ipython and jupyter

那年仲夏 提交于 2019-12-18 10:23:29
问题 I have a few (almost ten) Gb of memory taken by the ipython kernel. I think this is coming from large objects (matrices, lists, numpy arrays, ...) that I might have produced during some operation and now I do not need anymore. I would like to list all of the objects I have defined and sort them by their memory footprint. Is there a simple way to do that? For certain types there is nbytes method, but not for all ... so I am looking for a general way to list all objects I have made and their

in Ipython notebook / Jupyter, Pandas is not displaying the graph I try to plot

懵懂的女人 提交于 2019-12-18 09:57:29
问题 I am trying to plot some data using pandas in Ipython Notebook, and while it gives me the object, it doesn't actually plot the graph itself. So it looks like this: In [7]: pledge.Amount.plot() Out[7]: <matplotlib.axes.AxesSubplot at 0x9397c6c> The graph should follow after that, but it simply doesn't appear. I have imported matplotlib, so that's not the problem. Is there any other module I need to import? 回答1: Note that --pylab is deprecated and has been removed from newer builds of IPython,

old sklearn version in Jupyter Notebook

两盒软妹~` 提交于 2019-12-18 09:44:13
问题 I update sklearn version by terminal with conda install scikit-learn=0.18 if I list with conda list scikit-learn # packages in environment at /Users/Claudia/anaconda: scikit-learn 0.18.1 np111py27_1 scikit-learn 0.18.1 <pip> but if I run in notebook print('The scikit-learn version is {}.'.format(sklearn.__version__)) the result is The scikit-learn version is 0.17.1. How can I solve and update also the version in Jupyter Notebook? 回答1: to update the version used by Jupyter you need to open

How to add plot commands to a figure in more than one cell, but display it only in the end?

风格不统一 提交于 2019-12-18 07:32:29
问题 I want to do the following in a Jupyter Notebook: Create a pyplot.figure in a cell; For each subsequent cells, calculate values and plot them to that same figure without displaying anything; At the end, in another cell, display the figure with the result of every previous plot command. Currently, while using %matplotlib notebook , the figure is always displayed after the same cell it's been created, and I don't even call plt.show() . This is not the behavior I desire. Instead I would like to

How to add plot commands to a figure in more than one cell, but display it only in the end?

℡╲_俬逩灬. 提交于 2019-12-18 07:32:19
问题 I want to do the following in a Jupyter Notebook: Create a pyplot.figure in a cell; For each subsequent cells, calculate values and plot them to that same figure without displaying anything; At the end, in another cell, display the figure with the result of every previous plot command. Currently, while using %matplotlib notebook , the figure is always displayed after the same cell it's been created, and I don't even call plt.show() . This is not the behavior I desire. Instead I would like to

how to fix - error: bad escape \u at position 0

不羁的心 提交于 2019-12-18 07:11:35
问题 Hello I'm trying to export a gmap html using ipywidgets in jupyter notebook but am encountering the following error: - error: bad escape \u at position 0. I'm new to programing and could use help fixing whatever is causing this error to occur. If there is any easier way to go about exporting the html file I'm happy to change approaches. Thanks Here is a snippet of the code: I can add the entire thing if its helpful. import pandas as pd import gmaps from ipywidgets.embed import embed_minimal

stdout redirect from Jupyter notebook is landing in the terminal

天涯浪子 提交于 2019-12-18 06:54:45
问题 So I was trying to redirect stdout for a some of the cells in my Jupyter Notebook to a file with this and then cancel it with this for the rest of the cells. The output from the first set of cells landed in the file like it was meant to. The second set of cells after the cancel command sys.stdout = sys.__stdout__ was giving no output, appearing to do nothing, but I later realised it was landing in the terminal where the notebook was launched. It works perfectly in the Python interpreter with

Jupyter: can't create new notebook?

故事扮演 提交于 2019-12-18 03:04:29
问题 I have some existing Python code that I want to convert to a Jupyter notebook. I have run: jupyter notebook Now I can see this in my browser: But how do I create a new notebook? The Notebook link in the menu is greyed out, and I can't see any other options to create a new notebook. I've noticed this on the command line while Jupyter is running: [W 22:30:08.128 NotebookApp] Native kernel (python2) is not available 回答1: It looks like you don't have an IPython kernel installed (or any other