jupyter-notebook

How to make overlay plots of a variable, but every plot than i want to make has a different length of data

房东的猫 提交于 2020-01-25 07:25:45
问题 I want to overlay 30 plots, each of those is the Temperature of one day, to make at the end a comparison of the develop of the Temperature and how much differ from one day to another , the problem is that when i separate the data(separate the 30 days) in pandas, every day data set has different length,for example the first day has 54977 Temperature data , and the second day has 54988 ant the third also differ so the thing I want in resume is: overlay 30 plots and in the resultant graphic the

How to grant access privileges to DB2 table using SQLAlchemy in a jupyter notebook

别等时光非礼了梦想. 提交于 2020-01-25 06:47:32
问题 I've followed several examples to create and drop a DB2 table using SQLAlchemy within a python jupyter notebook. That works fine. But after creating the table, I need to set privileges so others can view it. I use this code to create a new table from a Pandas dataframe "df" from sqlalchemy import create_engine, text engine = create_engine(r"...") df.to_sql(name='MYTABLE', schema='MYSCHEMA', con=engine, if_exists='replace', dtype=dashdb_typemap, index=False) I can drop the table just fine with

Showing all possible methods on Jupyter notebook

筅森魡賤 提交于 2020-01-25 06:05:32
问题 So I was browsing through YouTube and found that it's possible to show all possible methods. For instance, I read you could use TAB or Shift+Tab but I still cannot get it to work. I have the latest Python downloaded. How can I make this option available? 回答1: You have to first initialize te object. Ex: execute a=[] in a cell, then type a.TAB and jupyter will show you all possible methods for a list. (similar for all other objects) Example for a list: Example for a Dataframe: 来源: https:/

Unable to install fancyimpute for use in Jupyter

江枫思渺然 提交于 2020-01-25 04:40:46
问题 I have been trying to import fancyimpute on a Jupyter Notebook, as I am interested in using K Nearest Neighbors for data imputation purposes. However, I continue to get the error described in the screenshot. I have already tried installing the following dependencies: pip install ecos pip install CVXcanon pip install keras pip install tensorflow pip install fancyimpute The error message is the following: Using TensorFlow backend. RuntimeError Traceback (most recent call last) RuntimeError:

Sending Commands from Jupyter/IPython running on EC2 to EMR cluster

ぐ巨炮叔叔 提交于 2020-01-25 01:25:12
问题 Can we send commands from Jupyter/IPython notebook running on AWS EC2 to AWS EMR having our code of word count ? I have followed the following url for installation of Jupyter on EC2. There is another link which installs Jupyter on EMR and performs Word Count However i want to seperate the Jupyter to come on EC2 and Word Count to execute on EMR. Is there any way that this could be done ? 回答1: This AWS Big Data Blog post for running Zeppelin on an external EC2 host connected to an EMR cluster

Remote jupyter kernel - different virtual environment?

五迷三道 提交于 2020-01-25 00:25:10
问题 I use the package remote_ikernel to automatically connect to an azure VM from an azure VM. The two systems are identical, that is, they have the same python environments. I start a remote kernel using ssh -oStrictHostKeyChecking=no {username}@{ip} sudo /anaconda/envs/py36/bin/ipython kernel And then update my local kernel.json by filling the parameters in the script below. {{ "argv": [ "/anaconda/envs/py35/bin/python", "-m", "remote_ikernel", "--interface", "ssh", "--host", "{username}@{ip}",

Cannot get Jupyter notebook to access javascript variables

丶灬走出姿态 提交于 2020-01-24 22:10:06
问题 I have a website that performs file format conversions, and this service can be used by other websites via the window.postMessage system. It would be great if one could do this also via a Jupyter notebook. I run however into a serious issue. I can get python to create a Javascript command that sends a file in format A to the website, and I can access the response (file in format B) in Javascript after some delay, but I cannot get the response from Javascript back into Python for further

Current working directory for jupyter notebook sets to temp folder in vscode

删除回忆录丶 提交于 2020-01-24 22:06:10
问题 I'm trying to set current working directory (CWD) to edited file location for Jupyter Notebook in VS Code. I use ${fileDirname} in python.dataScience.notebookFileRoot setting. However it uses temporary folder as ${fileDirname} instead of original file folder. Same issue was discussed couple times already (e.g. https://stackoverflow.com/a/54794976/12488601) with tried solution pointed out. Here is example of cwd: os.getcwd() .. 'C:\\Users\\MjH\\AppData\\Local\\Temp\\1f6cc207-562f-4ae1-8754

UnknownBackend: No event loop integration for u'inline' when enable inline matplotlib in emacs python notebook

与世无争的帅哥 提交于 2020-01-24 21:53:04
问题 I am trying to enable the python notebook in emacs. I am following the instruction from this page: https://realpython.com/blog/python/emacs-the-best-python-editor/ When I tried to do "%matplotlib inline" so that I can show the plot inline, I got the following errors: "UnknownBackend: No event loop integration for u'inline'. Supported event loops are: qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, OSX" My emacs is 24.4 and jupyter notebook version is 4.3 Thanks 回答1: If you are running

How to save state of ipython widgets in jupyter notebook using python code

岁酱吖の 提交于 2020-01-24 19:49:05
问题 I am using ipython widgets in my jupyter notebook. Now when kernel is restarted, the widget state is lost and a message is displayed: “Jupyter widget could not be displayed because the widget state could not be found. This could happen if the kernel storing the widget is no longer available, or if the widget state was not saved in the notebook. You may be able to create the widget by running the appropriate cells” So when a user reopens his notebook after a kernel restart, he doesn't find the