Newest 'jupyter-notebook' Questions - Stack Overflow

Questions tagged [jupyter-notebook]

The Jupyter Notebook is a web application that provides a frontend to many different languages and interactive shells such as IPython. Jupyter Notebook, unlike its predecessor IPython Notebook, supports many different languages and interactive shells in addition to Python and IPython.

1
vote
1answer
14 views

Why is my function checking for English apps returning True for non-English apps?

I'm currently doing an exercise in a guided project on dataquest.io in Jupyter Notebook. My goal is to write a function that checks if the characters in a given string each have an ASCII number of ...
1
vote
1answer
17 views

How to suppress output in Google Colaboratory cell which executes a command line script (line starts with `!`) via a function

In Google colab I execute command line scripts by place a ! in front of the line and executing the cell. For example !pip install adjustText If I want to prevent output of this cell, I can do ...
-1
votes
0answers
14 views

I keep getting JSONDecodeError when trying to import matplotlib in Jupyter Notebook

When I try to import matplotlib.pyplot as plt in Jupyter Notebook I get the following error: JSONDecodeError I have no idea how to proceed and have tried several solutions. Should I try reinstalling ...
0
votes
0answers
11 views

How to create a sector of circle on to a map using Python given lat long of one point, radius and angle? [on hold]

I am actually trying to represent the range of a radio device on to the map which has the beamwidth of say 90 degrees and range of 5km. Something like shown in the image given below.
0
votes
0answers
13 views

Values from csv file in json via jupyter notebook

I would like to put values ​​(numbers as text) from columns of a csv file automatically into a json file. From the result, I want to set a key and get this value back in a csv column. how can I tackle ...
0
votes
0answers
11 views

How to set a specific port for single-user Jupyterhub server REST API calls?

I have setup Spark SQL on Jypterhub using Apache Toree SQL kernel. I wrote a Python function to update Spark configuration options in the kernel.json file for my team to change configuration based on ...
0
votes
0answers
4 views

Loading Rails into an iRuby Jupyter notebook for deployment on AWS ECS

My end goal is to provide a Jupyter Notebook that can run any code that I would normally run from a Rails console, so that our data scientists can make notebooks using directly the models from our ...
0
votes
0answers
13 views

How to convert 2D DICOM slices to 3D image in Python

I am currently sitting on an task in which I need to plot DICOM slices into one 3D model using NumPy, Matplotlib, (Marchingcubes, Triangulation or Volumemodel) I have tried the method from this ...
0
votes
0answers
14 views

How do I run a JavaScript function in jupyter notebook?

I've two functions (one calling the another) written in JavaScript. I want to use these functions in my python script in Jupyter notebook, I did search and read a similar answer on the stack and read ...
0
votes
0answers
13 views

VScode: Automating conversion of python file to Jupyter notebook with a task

In VScode I can write a python file with markdown and python cells and then convert it to a notebook via the command palette. Everything works well, but I would like to automate this with a task. I ...
0
votes
0answers
11 views

how to load data to jupyter notebook VM from google cloud?

I am trying to load a bunch of csv files stored on my google cloud into my jupyter notebook. I use python 3 and gsutil does not work. Lets's assume I have 6 .csv files in '\bucket1\1'. does anybody ...
0
votes
1answer
6 views

Can I copy or upload a Google Colab notebook onto a AWS Sagemaker instance?

Want to have a copy of my Google Colab python notebook in my AWS Sagemaker Jupyter notebook(newbie to AWS Sagemaker) I tried selecting all cells in my Colab notebook and pasting in my sagemaker ...
0
votes
1answer
22 views

Jupyter-notebook numpy.core.umath failed to import

Jupyter notebook raised "numpy.core.umath failed to import" error when I imported tensorflow.But, It can be imported correctly in other situation,such as CMD and pycharm. tf2 is a conda virtual env ...
0
votes
0answers
18 views

Sqlite3 dbase table permanently locked for write

While running Python3 code in Jupiter Notebook, the code reads and writes from an sqlite3 db. It has had an intermittent dbase locking problem that now seems to be permanent. At the moment, the code ...
0
votes
0answers
7 views

How to close tensorboard using python command?

I'm starting Tensorboard via Jupyter magic command: !tensorboard --logdir="C:\Users\\OneDriv\tmp\logdir" --host localhost --port 8087 But, how can close it down? When I used to open it via CMD, I ...
0
votes
0answers
9 views

Mapbox Jupyter doesn't render ChoroplethViz

I've the following data and I'm trying to plot the Choropleth Viz using Mapbox Jupyter: data= {"type": "FeatureCollection", "features": [{"id": "0", "type": "Feature", "properties": {"ID": 1, "...
-3
votes
0answers
12 views

how can i connect jupyter notebook remotely?

The server that I want to run the Jupyter Notebook is blocked by a certain firewall, so I try to connect to it via an intermediate server, but it doesn't work jupyter notebook if I connected from that ...
0
votes
0answers
8 views

FCSParser in R Python Jupyter notebook wont work on files in flash drive

I'm trying to use fcs parser on some .fcs files stored in a flash drive (the file size is too big to store on disk). I am getting the files like this: data_path_training = "/Volumes/PHILIPS UFD/Data/...
-1
votes
2answers
45 views

How can I compare a DataFrame with if condition?

How can I create a new DataFrame with this if condition? df = pd.DataFrame() trips = pd.read_csv('trips.csv') stops = pd.read_csv('stops.csv') stop_times= pd.read_csv('stop_times.csv') route_id = ...
0
votes
0answers
11 views

Loading local tar.gz on Jupyter Notebook

I'm relatively new to Jupyter Notebook. I've downloaded a tar.gz file that contains .npz files. I'm trying to load the files using the Pypiano library and convert them into different formats (.mp3 or ....
-5
votes
2answers
66 views

Another Traceback Error When I Run My Python Code

I have a new Traceback Error When, I run my Python Code. It appears to be to do with the very last ) Parentheses, also maybe the last ] in my Code. ((df['Location'].str.contains('- Display')) & ...
0
votes
0answers
9 views

Integrate pydoc HTML into Jupyter ignoring styling

I'm wanting a simple way to show rich HTML documentation of a python object in a Jupyter Notebook or JupyterLab context. It's possible this already exists. I basically want what Jupyter/IPython does ...
0
votes
1answer
17 views

Extract and Replace values from duplicates rows in PySpark Data Frame

I have duplicate rows of the may contain the same data or having missing values in the PySpark data frame. The code that I wrote is very slow and does not work as a distributed system. Does anyone ...
1
vote
0answers
12 views

Running multiple Python versions (2.x. 3.y, 3.z) on Jupyter Notebook via multiple kernels

Apologies first-hand if I've done some silly mistake in the below raised issue. I have been stuck on this since quite some time, trying to successfully install multiple Python versions (via separate ...
0
votes
0answers
16 views

How do I graph multiple items that are in the same dataframe?

I have a large dataframe with the columns "Time", "Batch", and "Value". I would like to graph all the batches on the same graph, but cannot figure out how to slide my data accordingly. I have tried ...
-1
votes
0answers
5 views

Matplotlib quits half way through plots or gives FileNotFound error

Trying to make a histogram from a pandas dataframe using: %matplotlib inline import matplotlib.pyplot as plt from matplotlib import rc import pandas as pd plt.hist(data['total_income']) returns: [...
2
votes
3answers
62 views

How do I plot a Bar graph when comparing the rows? [duplicate]

I am having trouble in plotting a bar graph on this Dataset. +------+------------+--------+ | Year | Discipline | Takers | +------+------------+--------+ | 2010 | BSCS | 213 | | 2010 | BSIS ...
1
vote
1answer
19 views

Failed proccess error when downloading file from GitHub on Jupyter Notebook in Julia

I'm trying to download a file from GitHub using Julia in Jupyter Notebook: isfile("housing.data") || download("https://raw.githubusercontent.com/MikeInnes/notebooks/master/housing.data", ...
-1
votes
1answer
18 views

Installed tensorflow in one environment, now import doesn't work

So, I installed tensorflow in one environment in Jupyter, and now I can't import anything, even unrelated modules like pandas. The thing is I don't use tensorflow, but need it as backend for keras. ...
0
votes
2answers
34 views

How to store tkinter result to variable and use it across class while switching frame (destroy the previous frame)? [duplicate]

I'm trying to build software mimicking software installation page. The first page will ask on the installation directory. And when the "Next" button is clicked, the frame switched to another page (not ...
0
votes
1answer
32 views

Why can't I see all the columns in Jupyter notebook?

I am displaying a pandas df in Jupyter lab 0.35.5 with, pd.set_option('display.max_columns', 500) pd.set_option('display.width', 1000)` but I cannot see the righthand columns, there is no scrollbar ...
0
votes
0answers
13 views

problem with installing jupyter on Linux remote server

I want to know when installing jupyter on Linux remote server, I don't have sudo permission, I can't modify the configuration file generated by jupyter notebook -- generation-config, how do I need to ...
0
votes
0answers
13 views

Using interact in ipywidgets?

Consider the function below: def f(x,y): return x * y Using interact I could write the following: interact(f, x = fixed(2), y = (1,20)) and this would fix x at 2 and allow me to vary y between ...
1
vote
1answer
18 views

R foreach runs forever jupyter notebook with rpy2 python

I have a python jupyter notebook where I run some data-getting code which gives me a list of fcs files. I use fcsparser in R with a foreach in parallel to parse these like so: %%R -i files -o ...
0
votes
1answer
21 views

no display name and no $DISPLAY environment variable in Jupyter Notebook

I want to teach Python for kids. I want them to use Jupyter Notebook. To avoid the hassle of installation, I want them to use a free online Jupyter Notebook. I thought google's colab (link) and ...
0
votes
0answers
9 views

Clone a GitHub repo into a Jupyter Notebook folder

I have a github repo with a folder (Cables) with JSON files. I want to use the JSON files in Cables in my Jupyter Notebook. I tried running git clone from Jupyter but I get a file not found error. I ...
0
votes
0answers
8 views

Using GSL library in a jupyter notebook

I installed xeus-cling notebook on my mac laptop in order to be able to use Jupeter notebook for c++. I also would like to use gsl library #include <math.h> #include <stdio.h> #include &...
-1
votes
1answer
20 views

Matplotlib: How to prevent jupyter from squeezing a large graph into a single cell?

Any time I try to plot a large graph in jupyter with matplotlib, where I would wish to scroll around the large image in the cell it has been rendered in, the notebook seems to squeeze the plot down ...
0
votes
0answers
21 views

Pandas render cell contents as HTML

I am trying to embed an interactive dataframe in my jupyter notebook. Basically I would like to render my own HTML inside of some cells in my dataframe. First I have been experimenting by writing my ...
0
votes
0answers
5 views

Insert a new Markdown cell?

I don't want to change the default cell type. I want to create / change a shortcut / menu item (if possible) to insert a markdown cell. e.g. Run and insert Markdown cell below
0
votes
0answers
13 views

GridSearchCV not fetching mean_test_score in colab

I ran randomForestClassifier using GridSearchCV in colab. However, myGridSearchCV does not return mean_test_score and shows it does not exists. When i tried to check clf.cvresults there is not ...
0
votes
1answer
38 views

How do I change the format of a single cell in a pandas data frame?

My Data frame has summary of values for different types of metrics. They are all floats, but I need the budget to show up with a '$' and the two bottom rows as % instead of decimal. I have provided ...
1
vote
1answer
22 views

How to create a toogle button to show and clear output using ipywidgets?

I want to create a toggle button to display some output and clear it when switched in jupyter notebook using ipywidget. I tried to do it using widgets.Output(). This however displays empty lines as I ...
0
votes
1answer
23 views

Key Error 40 when using function from different Notebook

I am using a random forest in a jupiter notebook to predict something. I have a separate notebook in the same working directory, in which I have specified the functions. I am able to use all functions ...
0
votes
1answer
21 views

Error with if statement when runnin R in jupyter

I am running the following if conditin in R without any problem: nrow<-ifelse(S1_input, 1, ifelse(S2_input & nchar(bands)>40, 2, ifelse(S1_S2_input & nchar(bands)>40, 3, ifelse (...
0
votes
0answers
13 views

wrangling data in jupyter notebooks

Error whilst trying to gather twitter data. I have been given some info for twitter API but it seems i have problems even copying and pasting. When looping through the data it keeps failing, could ...
1
vote
0answers
26 views

How to run a python file .py in jupiter-notebook?

how can I run a python .py file in google colab with jupyternotebook?
1
vote
0answers
11 views

Jupyter Notebook running on GCP not showing output after reattach screen linux

I am using Google Cloud Platform to make a machine learning model for a problem. The dataset is huge and the model takes many hours to train. I found the method where we can use screencommand to keep ...
1
vote
0answers
12 views

How to mount google drive to R notebook in colab?

I have an R notebook in colab where I want to read a file which is saved in my google drive. I only seem to find python code such as "from google.colab import drive drive.mount('/content/drive')" ...
1
vote
2answers
19 views

Replace value in Pandas DF column, based on a condition

I'm new to Python so I apologize in advance for this probably gross code. I'm trying to complete a web scraping project and I currently have a dataframe with a price column (currently as strings). My ...