Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
72 views

I have a .ipynb file and want to only import certain functions from it to another .ipynb file. if I use: if __name__ == "__main__": would the script run what is under that if statement ...
0 votes
1 answer
73 views

Running the code with the magic command %time in IPython got CPU times and Wall time as shown below: In [1]: %time sum(range(1000000)) CPU times: total: 31.2 ms Wall time: 26.7 ms Out[1]: 499999500000 ...
1 vote
3 answers
1k views

When running %pip install in my Synapse notebook manually, it works as intended, without any problems. However, when I try to run that same notebook in a pipeline, I get: { "errorCode": &...
1 vote
2 answers
162 views

I am creating jupyter notebook tutorial to run streamlit app. I use %%writefile dashboard_ui.py to write the cell code into the given file. %%writefile app.py import streamlit as st st.title('Hello ...
1 vote
1 answer
620 views

I am currently trying to work through a Databricks course and am getting the following error stating that "Your administrator has only allowed sql and python commands on this cluster. This ...
0 votes
1 answer
71 views

I have my Azure DevOps repo cloned into Databricks. I'm trying to run the %run on a secondary notebook in the repo. When I attempt to execute the %run command on the secondary notebook, I consistently ...
1 vote
1 answer
1k views

I would like to push my notebooks into GitLab without them showing the different outputs (3d plots, dataframes, etc...) in order to keep the size of those notebooks reasonable. I had the following ...
0 votes
1 answer
303 views

To clarify, somfile.py needs variables that are generated from main.ipynb. So, when I simply do %run somefile.py I get this error: NameError: name 'viewer' is not defined This viewer is defined in the ...
2 votes
2 answers
3k views

The magic commands work perfectly in Notebooks. However, While running the same notebook from the Synapse pipeline, it could not locate the notebook's path. Appreciate your help { "errorCode&...
1 vote
1 answer
634 views

I don't know how to run the python scripts in parent directory using Jupyter Notebook's magic command %run script_name. I attempted to add the parent directory path into the sys.path as I did in the ...
6 votes
2 answers
9k views

I have 2 notebooks under the root folder in my workspace. Calling one notebook from the other with %run magic cmd returns error saying file path not found. This is my command: %run /Users/name@comp....
1 vote
1 answer
3k views

My code uses SQL to query a database hosted in BigQuery. Say I have a list of items stored in a variable: list = ['a','b','c'] And I want to use that list as a parameter on a query like this: %%...
1 vote
1 answer
479 views

the screenshot for jupyternotebook I've successfully installed ryp2 using wheel. I'm using Python 3.7.6 and rpy2 2.9.5. I can get the output from jupter notebook when running python code but it doesn'...
25 votes
2 answers
12k views

There are many resources that explains why %matplotlib inline is necessary to display plots inline. E.g. Purpose of %matplotlib inline. However, I feel that it is no longer necessary if we are using ...
41 votes
4 answers
74k views

Running this python scripta: %%time train_data = dt.fread('../input/prediction/train.csv').to_pandas() The provided output returns this error: UsageError: Line magic function %%time not found. ...

15 30 50 per page
1
2

AltStyle によって変換されたページ (->オリジナル) /