Questions tagged [jupyter-notebook]

1

votes
0

answer
222

Views

How to interactively update IPywidgets container (VBox, HBox)?

When I try to update a container that contains other dynamically created container it doesn't change. I tried different options but in the current one I defined the variables holding the containers before the update function and call this function whenever a change occurs: history_array = [] fig_arr...
Patrick
1

votes
1

answer
275

Views

How to write Jinja2 template for Jupyter nbconvert to show markdown and suppress output number?

I am trying to write a Jinja2 template to convert my Jupyter notebook to a PDF via LaTex using nbconvert. My current attempt does not show Markdown cells or image captions and also shows the following output above all of my matplotlib graphs: out[1]: I would like to display markdown cells and capti...
seanysull
1

votes
1

answer
888

Views

changing anaconda folder path

I recently have installed anaconda in my Ubuntu machine.By mistake,i shifted the anaconda folder from my home directory to inside another folder.Now when i tried to use anaconda command in the terminal it showed the error-'command not found'. Again i shifted my anaconda folder to it's by default hom...
Anonymous
1

votes
1

answer
301

Views

how to make decision tree look nice in R and/or Jupyter?

I'm very new to R, and decision trees in general, so sorry if this is a dumb question. I am trying to make a decision tree in R. It's working, but when it does not look nice. It looks smushed. I know it looks better when I expand the image, but it doesn't look good in Jupyter either. Here's my cod...
Emily Lerman
1

votes
0

answer
142

Views

Plotly Choropleth showing no output

I was trying to plot choropleth map using plotly but getting a blank output.I am not getting any map.here is my code- input- import plotly.plotly as py from plotly.offline import download_plotlyjs,init_notebook_mode,plot,iplot import plotly.graph_objs as go init_notebook_mode(connected=True) %matplo...
1

votes
0

answer
112

Views

Matplotlib.animation performance with Axes3D

I have played with creating HTML5 videos from matplotlib.animation.Artistanimation, it works well for both 2D and 3D images, but for the 3D version, the conversion to html5 video is very slow, like 200s for 35 frames. Given that it takes roughly 3 times longer to draw a 3D figure than a 2D figure,...
kakk11
1

votes
0

answer
52

Views

How to write \cancelto {0}{x} in Jupyter

I'm trying to write \cancelto {0} x in Jupyter It does work in LaTex, but not in Jupyter.Can't find any answer anywhere. If anyone knows, please, let me know. Thank you.
mocs
1

votes
0

answer
651

Views

How to connect to a remote Jupyter Notebook running on a docker container?

I am running a Jupyter-notebook on a docker container (ubuntu) running on a remote machine (amazon p2). I want to access the notebook via my browser (http://localhost:8883/) but am getting: open failed: connect failed: Connection refused My ssh confing: Host p3 HostName User LocalForward 8883 127...
avitheavi
1

votes
1

answer
53

Views

Different behavior between Jupyter kernel and Python

I've been working on a Jupyter notebook on my local, and have recently migrated it to an Ubuntu Linux VM located on a remote server. I've install Python and Jupyter on the remote server successfully, and am accessing it via SSH portforwarding. I have been able to run other scripts and files successf...
Mike
1

votes
0

answer
582

Views

jupyter notebook does not render LaTeX properly

I started using python with the jupyter notebook and I really like the markdown feature. The only problem (more esthetically) is that the printing is not like the standard LaTeX/Mathjax rendering. This is my first cell import sympy as sm import numpy as np This is my second cell (example code from d...
MrYouMath
1

votes
0

answer
213

Views

Using python3 locally while running pyspark3 jupyter kernel

Does anyone know how to change the specific instance of python invoked in the %%local spark magic when running a pyspark3 kernel in jupyter? When running the PySpark3 kernel that ships with sparkmagic, I often want to pull data down to my local machine and do some calculations there. However, the...
John
1

votes
0

answer
1.2k

Views

Issue defining KneighborsClassifier in Jupyter Notebooks

I am attempting to utilize KNN on the Iris data set as a 'Hello World' of Machine Learning. I am using a Jupyter Notebook from Anaconda and have been clearly documenting each step. A 'NameError: name 'knn' is not defined' exception is currently being thrown when I attempt to use knn.fit(X,Y) What...
StormsEdge
1

votes
0

answer
86

Views

unable to download nbextensions' javascript and css file

I am trying to install nbextensions to my jupyter notebook. When opening the notebook, I can see the tab for the nbextensions but is is empty. There is a reload button moving but nothing ever shows. I went to command prompt and the following commands were executed successfully: pip install jupyter_c...
sammmm
1

votes
0

answer
178

Views

Import of package works in IPython shell but not in Jupyter notebook

I think this question is probably closely related to another one I had, but I'm not sure what the best general-purpose answer is. On my laptop, if I log into the IPython shell, I can execute In [1]: import matplotlib without error. But if I try to do the same thing in a Jupyter notebook, I get the f...
dbliss
1

votes
0

answer
240

Views

Jupyter notebook button widget: Remove all click handlers?

It seems (correct me if I'm wrong), that when I invoke button.on_click(callback), the object button being an instance of ipywidgets.Button, the function callback is added to a list of click handlers. How can I access this list? I would actually like to clear this list. If I could find the callback l...
fmg
1

votes
0

answer
25

Views

object name + dot + tab does return list of methods twice in jupyter notebook

jupyter notebook + py3, local running Could anyone please help me with fixing it? screenshot
Ilya
1

votes
0

answer
1.1k

Views

installed keras and tensorflow but getting error

i am getting the this importerror even i have installed all the necessary modules like keras , tensorflow etc, i am not able to resolve it even working in conda environment. ImportError: No module named python.training #Imports import os from random import shuffle #Keras imports from keras.preproc...
Amit kumar
1

votes
1

answer
565

Views

Can't serve jupyter notebook with nginx reverse proxy

What I am trying to accomplish is to have a jupyter notebook running localhost on a VM and serve it online using nginx reverse proxy over https. For the moment I am trying to serve it over plain http to test that it works I used many configurations that I found online but it is not working. My nginx...
Zisis Diamantis
1

votes
1

answer
709

Views

Why I am getting this error: object has no attribute 'astype'

I have defined a function myfunc inside a python file myfile. when i import this function from a jupyter notebook, it is showing the following error: import numpy as np import os from scipy.misc import imread import ast from myfile import myfunc ..... class_mask = np.equal(image, i) class_mask = cla...
S.EB
1

votes
1

answer
63

Views

Why are class methods listed twice?

When I hit tab on variables which are of a certain type (like numpy arrays) I get all the methods listed twice. See below Any reason why this might be? My PATH has anaconda listed twice /Users/demetri/anaconda3/bin:/Users/demetri/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/T...
Demetri Pananos
1

votes
1

answer
102

Views

Updating Matplotlib subplots with images in Jupyter/Python 3

I have a function, modified from an external source, that takes a list of images and displays them on a grid within a Jupyter notebook (python 3). def show_images(images): images = np.reshape(images, [images.shape[0], -1]) fig = plt.figure(figsize=(28, 28)) gs = gridspec.GridSpec(28, 28) gs.updat...
Novak
1

votes
0

answer
113

Views

Export jupyter notebook with matplotlib images without inline

I would like to export a jupyter notebook to html or ipynb to display online (e.g. Github). My notebook produces some images with matplotlib, and I would like a static version of these images to be included. I've seen several examples of this, and they all seem to use the inline option: %matplotlib...
tiago
1

votes
0

answer
967

Views

convert jupyter notebook saved as .HTML file back into .IPYNB

Can I convert a Jupyter Notebook saved as .HTML file back into .IPYNB file? The executable original notebooks were lost. The nbconvert docs don't have anything useful for this case. Currently I have to copy-paste bunch of cells into a new notebook, but this is very tedious and output cells will be...
denfromufa
1

votes
1

answer
125

Views

Set default value for interact in jupyter notebooks

I have a problem with a widget. It is a selection list that selects the range of months for a graph output. This means the value which is used to fill the following line. df4[(df4.year_month >= begin) &(df4.year_month
Fabian Kramer
1

votes
1

answer
31

Views

Error when installing software in Jupyter

I am running jupyter notebooks but when trying to install software with: !pip install ipython-sql it returns this error: copying build/lib.linux-x86_64-2.7/prettytable.py -> /usr/local/lib/python2.7/dist-packages error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/prettytabl...
santimirandarp
1

votes
1

answer
874

Views

Jupyter Notebook not working in browser

I downloaded Anaconda and attempted to run Jupyter Notebook right away but the browser tab displays This page isn't working, localhost is currently unable to handle this request. HTTP ERROR 500. I've looked all over online for answers but haven't found any solutions that have worked, so I re-downlo...
Sia
1

votes
1

answer
939

Views

Multiple dependent widgets (dropdown menu) on Jupyter notebook

I was following the example on how to handle multiple dependent widgets on jupyter notebooks from here: Dynamically changing dropdowns in IPython notebook widgets and Spyre In that example the code solution was the following: from IPython.html import widgets from IPython.display import display geo={...
davidvarenne
1

votes
0

answer
201

Views

pivottablejs does not display any result in the jupyter notebook

pivottablejs does not display any result in the jupyter notebook. Clicking on the hyperlink(pop out), displays an empty page. from pivottablejs import pivot_ui from IPython.display import IFrame from IPython.core.display import display import pandas as pd df = pd.read_csv('sample.csv',encoding='utf...
Hackerds
1

votes
0

answer
313

Views

Jupyter Notebook not adaption to protocol 5.1

Just swtiched from a MBP to a ThinkPad, Windows 10. Fresh download of Python 3.6. Fresh download of jupyter, pip, not conda. Tried to start kernels and the console kept looping through the below. Cleared cache, attempted to upgrade jupyter, jupyter_client, switched browsers, all to no avail. Any...
Brian Mauck
1

votes
0

answer
283

Views

Jupyter Notebook unable to create notebook in non root directory

After updating Jupyter Notebook (versions below): jupyter 1.0.0 py36h422fd7e_2 jupyter_client 5.2.1 py36_0 jupyter_console 5.2.0 py36h6d89b47_1 jupyter_core 4.4.0 py36h56e9d50_0 I now cannot creat...
jbt
1

votes
0

answer
175

Views

How to install scala kernel for hydrogen?

I'm looking at: https://nteract.io/kernels it's saying how to install python kernels for hydrogen: python -m pip install ipykernel python -m ipykernel install --user but which python -m pip install [scala kernel?] command should I use to install the scala kernel? or is it a whole other process? wher...
Jas
1

votes
0

answer
170

Views

Use ipython widgets to manipulate plots, that are constantly updated from within an infinite loop

Within an ipython notebook, using Jupyter I try to do a calculation, thats running for an extended period of time in a while loop. I use pyplot to show the current status of my calculation and I would like to be able to communicate with the calculation and the plot via ipywidgets. For example this c...
FMey
1

votes
0

answer
75

Views

What's the keyboard shortcut of next option in completion list of Jupyter Notebook?

For example, input the following codes in the first cell of a Jupyter Notebook in a browser: aaa = 1 aab = 2 In the second cell, after inputing aa, a completion list containing aaa and aab appears. I want to select aab with keyboard. But after tried TAB, Up/Down key and Ctrl-p, no one works. I have...
Chad
1

votes
0

answer
58

Views

Can I tweak Jupyter Notebook to add two consecutive cells instead of one?

Every time we run a cell in the notebook, another empty cell gets created below it (perfectly fine) But, can I somehow tweak it to add two consecutive cells because using shortcuts every time is a bit painful and I firmly believe it can be tweaked somehow like this: one markdown to write what I infe...
Aditya
1

votes
2

answer
520

Views

Jupyter Notebook 404s when using Anaconda Navigator

Sorry but a bit of a beginner question here. I downloaded Anaconda library that comes with Jupyter Notebook along with a few other programs to hopefully learn Python. Every time I try to open Jupyter Notebook though, the webpage it directs me here localhost:8888/tree and gives me the following error...
Kyle McComb
1

votes
1

answer
201

Views

Issue printing PySpark dataframe as formatted table in Jupyter

I have an PySpark dataframe (df) that I'd like to print as a nicely formatted table in my Jupyter notebook. As per this post, I thought the following code would work: import pandas as pd from IPython.display import display, HTML pandas_df = df.toPandas() display(HTML(pandas_df.to_html())) Unfortunat...
LenL
1

votes
0

answer
176

Views

Kernel keeps restarting in the same spot in a Jupyter Notebook

My entire Jupyter Notebook runs fine until my very last piece of code which is: from gensim.summarization import keywords print ('Keywords:') print (keywords(All_questions, words=10)) I am pretty sure it's giving me it is not working because this is a computationally expensive task, since there are...
mkheifetz
1

votes
1

answer
1.7k

Views

Downloading zip folder/file from google drive from shared with me folder

I have been provided with access to a zip file/folder which is stored in my google drive and inside 'Shared with me'. How can I download it to my laptop through terminal using 'wget' or python or anything related. The url for the whole folder within which it is contained goes like, https://drive.goo...
dJOKER_dUMMY
1

votes
2

answer
80

Views

How to find min and max time in Chat log conversation using pandas for calculating duration?

Want to calculate the duration of each ID and to write in the separate Columns ID Ques Time Expected output ---------------------------------- 11 Hi 11.21 1min 11 Hello 11.22 13 hey 12.11 10mins 13 what 12.22 14 so 01.01 2mins 14 ok 01.03 ----------------------...
RVKNLP
1

votes
1

answer
29

Views

Creating n random lists

I'd like to create n random 10-number-lists using python, and put these lists in a single variable(ran). Below is my code: from random import shuffle def gen_random_list (num): ran = [] k = [n for n in range(1, 11)] for i in range(num): shuffle(k) ran.append(k) return ran The expected output shou...
Dyckia

View additional questions