jupyter-notebook

Setting up a function in a class that will read in csv data in a way that it can be referenced in future functions

北慕城南 提交于 2021-01-29 07:29:11
问题 I'm trying to determine the best way to define a function within a class that reads a specific .csv file if a criterion is met. Then, the function returns the data in the file. But I need it to return the data in a way that allows me to call on those data again in a future function in the class. Some background: The data I'm reading in are time-stamped temperatures. The columns in each .csv file are 'day', 'hour', 'temp_1', 'temp_2', 'temp_3', 'temp_4' Then, there are rows of numeric data for

How do I get pyspark working in Jupyter Notebook in a virtual environment on Windows?

落爺英雄遲暮 提交于 2021-01-29 07:09:40
问题 I'm receiving the dreaded 'Exception: Java gateway process exited before sending its port number' error but I've followed everything I can find already and it's still not working. The worst thing is I swear this set up worked last week and somehow doesn't anymore. I can run pyspark perfectly fine in the virtual env from the command line and outside of the virutal environment (I'm using Pipenv) so it must be something to do with Jupyter Notebook. Has anyone solved this problem on Windows who

How to config 'Completer.use_jedi' to 'False' in Juypter Notebook permanently

[亡魂溺海] 提交于 2021-01-29 06:06:16
问题 Every time a new jupyter notebook instance is opened, it requires %config Completer.use_jedi = False command to be run, before autocomplete functionality starts working. This is tiring every time, to config use_jedi to False before coding. kindly suggest if there is a permanent fix to have autocomplete in juypter notebook. 回答1: I launch my jupyterlab from docker and catch this problem. I solved like this: COPY ipython_kernel_config.py /root/.ipython/profile_default/ipython_kernel_config.py

adding conda environment via cmd line to jupyter doesn't work

北城以北 提交于 2021-01-29 06:02:06
问题 Trying to get OSMnx into jupyter conda environment. But conda environment not set correctly. On command line: Created conda environment using OSMnx installation steps I cloned the environment to rename it 'realestate' Added realestate to Jupyter: > conda activate realestate > conda install -c anaconda ipykernel > python -m ipykernel install --user --name=realestate > which python /opt/anaconda3/envs/realestate/bin/python On Jupyter the realestate environment shows up... but when I run !which

How do i automate my jupyter notebook using google cloud?

孤者浪人 提交于 2021-01-29 05:54:16
问题 I have a code with Jupyter notebook and i would like to schedule daily running by Google Cloud. I already created VM instance and running my code there, but I couldn't find any guide or video how to implement daily running. So, how can I do that? 回答1: Google is offering a product which is called AI Platform Notebooks. It is implementing lots of useful stuff like lots of open-source frameworks, CI etc. There is also a blog post by the Google Cloud that explains the product in depth and can be

kernel appeared in jupyter notebook but not working

丶灬走出姿态 提交于 2021-01-29 05:45:25
问题 I am planning to use virtual environment in jupyter notebook through the following steps: conda create -n test python==3.6 conda activate test ipython kernel install --user --name=test Then i get the following in return: Installed kernelspec test in C:\Users\User\AppData\Roaming\jupyter\kernels\test which seems to be working when I saw the test kernel appeared in jupyter notebook. However, when I switch to that kernel, it is actually using my default python enviroment. I also checked the

Example from documentaion doesn't work in Jupiter Notebook

笑着哭i 提交于 2021-01-29 05:11:41
问题 I had looked at the documentaion. And there was an example from multiprocessing import Pool def f(x): return x*x if __name__ == '__main__': with Pool(5) as p: print(p.map(f, [1, 2, 3])) The problem is: it is not working. I run this code in Jupiter Notebook cell. And this the cell doesn't raise any exception. But Jupiter's terminal does. And it says: AttributeError: Can't get attribute 'f' on <module '__main__' (built-in)> As written here the problem may be because I don't use __name__ == '_

Using a new windows version of R in Jupyter notebooks

被刻印的时光 ゝ 提交于 2021-01-29 04:00:37
问题 I've installed R version 3.5.1 for windows and copied its contents to the R folder used by Anaconda3. However conda still identifies the current version as 3.4.3. Is there a "version id" file somewhere in the Anaconda3 folders? 回答1: Short solution In short you need to install a the IRkernel package in the version of R you want to use with Jupyter and then make it available to Jupyter. See here. Diagnosis You may not be aware that you have two installations of R. To confirm this is the case in

Why I'm getting this error? What can be done to install osmnx on windows 10?

蓝咒 提交于 2021-01-28 21:18:26
问题 I'm not able to install osmnx in jupyter notebook. The following problem is occurring with shapely version 1.6 I could install shapely 1.4 but osmnx needs 1.6 version The command I used is !pip install osmnx Collecting Shapely>=1.6 (from osmnx) Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz ERROR: Command errored out with exit status 1: command: 'c:\users\shrinath\anaconda3\python.exe' -c

Is there a shortcut for selecting current word when editing a cell in jupyter notebook?

白昼怎懂夜的黑 提交于 2021-01-28 13:39:55
问题 The bounty expires in 6 days . Answers to this question are eligible for a +50 reputation bounty. Wolfram Arnold wants to draw more attention to this question: The bounty goes to the person who provides an answer of a functional keyboard shortcut on Win/Mac/Linux. I know there is the shortcut ctrl + w in visual studio for selecting current word. Is there a shortcut or an extension for jupyter notebook which does the same? 回答1: Hah! I found the answer shortly after putting a bounty out. On