Questions tagged [jupyter-notebook]

1

votes
1

answer
1.6k

Views

Jupyter widget does not appear in notebook

I'm running a jupyter notebook but the jupyter widgets does not appear. Instead I receive the folllowing message: Failed to display Jupyter Widget of type Button. If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean that the widgets JavaScript is still loading....
Daniel Zapata
0

votes
0

answer
3

Views

How to set env variables to start jupyter-notebook from cmd in windows 10

I installed Jupyter under Windows 10 in cmd with 'python -m pip install jupyter' but can't call the notebook with 'jupyter notebook'. I already set env variables as follows: C:\Users...\AppData\Roaming\jupyter\runtime C:\Users...\AppData\Roaming\Python\Python37\Scripts\jupyter.exe Still doesn't work...
Dura
1

votes
1

answer
1.3k

Views

Installed BeautifulSoup but still get no module named bs4

I'm using a Jupyter notebook, Python 3.5, and a virtual environment. Within my virtual env I did: (venv) > pip install BeautifulSoup4 Which seemed to run fine b/c the terminal output was: Downloading beautifulsoup4-4.6.0-py2-none-any.whl (86kB) 100% |████████████████...
14wml
1

votes
2

answer
451

Views

Matplotlib x-axis overlap

I have two lists, x_axis which is list of time in the format of '12:30:00'. The y-axis is percent values. I need to plot all the values on a graph, however since x-axis string is too long they overlap. Is there anyway I can have matplotlib not show every single time on x-axis? Any help would be appr...
1

votes
3

answer
568

Views

Can't run any ipynb files using Jupyter Lab or Jupyter Notebook (FileNotFoundError: [WinError 2] The system cannot find the file specified)

I have JupyterLab/JupyterNotebook running on Win10, along with Python and PyCharm on the side on Windows 10. Whenever I launch JupyterLab/JupyterNotebook I get the error stated below. I have tried reinstalling the Anaconda-distribution or any other instances of Python but it gives me the same error...
amrtw09
1

votes
2

answer
12

Views

Fitting Logistic Regression model to MNIST data takes very long

I am trying to apply LogisticRegression model from sklearn to the MNIST dataset and i have split the training - test data into a 70-30 split. However, when i simply say model.fit(train_x, train_y) it takes a very long time. I have added no parameters when initiating logisticregression. code : im...
TheNoob
0

votes
0

answer
8

Views

How to fix “Sorry, something went wrong. Reload?” in GitHub?

I'm uploading Python Code in GitHub. But sometime the message shows that it say Sorry, something went wrong. Reload?. Is there any way to fix/erase when uploaded ipynb file?? Thanks ipynb file error Or Just Tell me why it cause..don't know why it haapens..
Minsuk Sung
1

votes
4

answer
598

Views

jupyter-notebook, ImportError: cannot import name 'Type'

I am a window user, and I have install python 3.6 on my computer. In order to use jupyter notebookd, I downloaded atom, i have ipython and pandas installed already. After my installation, I find after entering the command 'jupyter notebook' on the command-line , my browser will not open jupyter note...
1

votes
1

answer
22

Views

Convert a list to dataframe in python jupyter notebook

I have a lists name 'val' which is below: [ x y 0 0.0 A 1 1.0 B 2 2.0 C 3 3.0 D 4 4.0 E 5 5.0 F] I need to convert this to a pandas dataframe where i'm failing. the code i used is: df = pd.DataFrame(val) The output which i'm getting is: 0 x y 0.0 A 1.0 B 2.0 C 3....
Sara
1

votes
3

answer
25

Views

How to find specifics values in a dictionary for repeated headings of the same name?

I have created a dictionary named 'city_metrics' which contain headers such as City, Country, Population, Area. In my dictionary, there are 3 City, 3 Population and 3 Are. city_metrics = [{'City': 'Santiago', 'Country': 'Dominican Republic', 'Population': 900000, 'Area': 4758}, {'City': 'Montreal',...
Kadodo14
1

votes
1

answer
82

Views

How to use Monte Carlo method to find the volume of a sphere in python?

I need to use the Monte Carlo method to find the volume of a sphere in a python3 environment in jupyter notebook. But the examples of the method in my lecturer's code doesn't seem to make sense. I've been instructed to modify my lecturer's code which uses the monte carlo method to find pi using a ci...
dubmles
1

votes
3

answer
43

Views

How to use For Loop to add integer as a string in list?

I have created the list below: Stores = ['Costco','Publix', 'Kroger', 'Target'] I am asked to create a another list (Store_Rank) to define their ranking by adding integers in front. However, the integers should be in a list format. I am assuming f-interpolation is to be used? 'Store_Rank' list shoul...
Kadodo14
1

votes
1

answer
45

Views

Jupyter notebook: let a user inputs a drawing

Simple question but I'm not able to find something out there... Is there a simple and user friendly tool that can be used within a jupyter-notebook to let the user draw something in black on a white space (let say of size (x,y) pixels) after running a cell? The drawing has to be returned (or even te...
s.k
1

votes
0

answer
13

Views

how to find out the water consumption rate based on the water levels in sump and tank?

Before i predicted the future water consumption rate using ARIMA Model. But now i has to find out and predict the water consumption based on the levels in the tank and the sump.I have the hardware which is measuring the level of sump and tank. I know, i should know the dimension and have to calculat...
Bindu TR
1

votes
1

answer
25

Views

PyCharm 2019.1 CE: No option to create/edit Jupyter Notebook (*.ipynb) files?

I updated Pycharm CE from 2018.3 to 2019.1 and lost ability to create or open an existing jupyter notebook file. The existing .ipynb file opens as a text file rather than a jupyter notebook with cells. I could open and view it fine on 2018.3. I am new to PyCharm and indeed also jupyter notebooks, pl...
Sanu Kurien
1

votes
1

answer
2.5k

Views

What does In[num] mean in jupyter notebooks?

I know that In[*] means the kernel is running But what does In[93] mean? Does that mean the total number of seconds to execute the cell or is that the line number?
14wml
1

votes
2

answer
3.3k

Views

How to choose your conda environment in Jupyter Notebook

I installed Anaconda 5.3 with Python 3.7 (root environment). After that I created a new environment (py36) using Python 3.6 I activated the new environment with activate py36 conda env list shows that the environement is active. But when I start Jupyter Notebook (from the Anaconda prompt with jupy...
Rene
1

votes
2

answer
49

Views

Extracting the nth element from each list and storing it in a new column [duplicate]

This question already has an answer here: Python Pandas: selecting element in array column 2 answers I've a dataframe (called 'df') which contains a column called 'grades'. This column contains a list of grades. The data in this column is of type 'object'. student_id grades 0 11 [A,A,...
Mark Kennedy
0

votes
0

answer
12

Views

“'OSError: [Errno 23] Too many open files in system:' When importing functions on all engines”

I am trying to process a list of objects in parallel on a cluster using ipyparallel but I am having an error saying too many files open. I am using Jupyter notebook and can start 230 engines on the cluster. I am using Jupyter notebook and can starte 230 engines on the cluster. When trying to impor...
BND
1

votes
1

answer
27

Views

How do I convert data from .csv file into a NumPy array and use statistics to find the mean of the data? [duplicate]

This question already has an answer here: How do I read CSV data into a record array in NumPy? 10 answers I want to convert the data from the .csv file into a NumPy array and then find the mean of the data. import csv import numpy as np import statistics as stat with open('pima-indians-diabetes.csv...
B. Adams
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

View additional questions