jupyter-notebook

How to input data within Jupyter Notebook

断了今生、忘了曾经 提交于 2019-12-10 15:27:06
问题 I have searched for but have not found a solution to this: Is there a way to create data within Jupyter Notebook, particularly tabular data in the form of a pandas DataFrame, via a spreadsheet-like interface as opposed to pd.DataFrame({a:[],b:[]})? I don't mean read csv or XLwings as solutions, but rather a 'spreadsheet' in the notebook itself so that all information can be edited and stored in one place, and using it feels familiar to a more broad category of people. Open to creative ideas.

Jupyter notebook is displayed partially in French

不打扰是莪最后的温柔 提交于 2019-12-10 14:03:02
问题 I'm using Jupyter for Python programming on Windows 10 and some of the text is translated in French but not all of it (which makes it kinda annoying). Does someone know how to change the display language? I am unable to find the answer on internet because every time I'm searching for "language" it shows me answers for programming languages (R, Python, etc.) 回答1: I had the same problem. Had to change the language settings in Chrome. 回答2: (Internet Explorer): Just go to your internet options in

Jupyter commands work only with a dash (e.g. jupyter-kernelspec instead of jupyter kernelspec)

一世执手 提交于 2019-12-10 12:58:51
问题 I am using Jupyter with Anaconda3. My Anaconda3\ and Anaconda3\Scripts\ folders have been added to the %PATH% variable. Eventhough the jupyter.exe is in the Scripts folder above, Jupyter related commands don't work without a dash. For example: jupyter kernelspec --version Error executing Jupyter command 'kernelspec': [Errno 'jupyter-kernelspec' not found] 2 The same command with a dash works: jupyter-kernelspec --version 5.2.2 And the same goes for jupyter-notebook , etc. Do I have to add

Why does %timeit loop different number of times?

倾然丶 夕夏残阳落幕 提交于 2019-12-10 12:48:13
问题 On Jupter Notebook, i was trying to compare time taken between the two methods for finding the index with max value. In the Image, the first function took, 1000 loops, and the second took 10000 loops, is this increase in loops due to the method itself OR Jupyter Just added more loops to get more accurate time per loop even though the second function maybe took 1000 only, is that the case? 回答1: %timeit library will limit the number of runs depending on how long the script takes to execute. The

Python kernel dies when importing tensorflow 1.7

◇◆丶佛笑我妖孽 提交于 2019-12-10 12:44:30
问题 I want to use tensorflow insinde a Jupyter notebook. However, running import tensorflow as tf in a Jupyter notebook immediately triggers a pop-up: The kernel appears to have died. It will restart automatically. This issue only began after updating to tensorflow 1.7. I had not used tensorflow for a few weeks so it might also be due to an update to anaconda 5.1 with Python 3.6. I use a Mid-2010 MacBookPro with "High Sierra 10.13.4". Removing and reinstalling anaconda 5.1 with Python 3.6,

jupyter pyspark outputs: No module name sknn.mlp

℡╲_俬逩灬. 提交于 2019-12-10 11:55:30
问题 I have 1 WorkerNode SPARK HDInsight cluster. I need to use scikit-neuralnetwork and vaderSentiment module in Pyspark Jupyter. Installed the library using commands below: cd /usr/bin/anaconda/bin/ export PATH=/usr/bin/anaconda/bin:$PATH conda update matplotlib conda install Theano pip install scikit-neuralnetwork pip install vaderSentiment Next I open pyspark terminal and i am able to successfully import the module. Screenshot below. Now, i open Jupyter Pyspark Notebook: Just to add, I am able

Render a Jupyter Notebook Iframe in Flask

南笙酒味 提交于 2019-12-10 11:36:42
问题 I'm using Flask to host a UI for a single user. Something I've been trying to do is setup a way for user to click a button that inserts some text and images in a pre-specified place in a document using markup language. I originally used Jinja2 for this but the issue is the user needs to be able to modify the document after the data is inserted in case they need to make small changes to the text or add a line etc... which to my knowledge can't be done with a flask-rendered template. I

How to switch to python 2.7 from python 3- jupyter notebook

社会主义新天地 提交于 2019-12-10 11:35:38
问题 I am running a Jupyter notebook instance and it has both python 2 and python 3 kernels. However, when i use the python 2 kernel and execute below statements, import sys sys.executable I get python 3 path '/usr/bin/python3.4' How do i force it to use python 2.7 回答1: Re-installing Jupyter with pip instead of pip3 is what worked 来源: https://stackoverflow.com/questions/45106616/how-to-switch-to-python-2-7-from-python-3-jupyter-notebook

UserWarning: Boolean Series key will be reindexed to match DataFrame index

不想你离开。 提交于 2019-12-10 11:13:28
问题 When using this statement this shows multiple warning in a single statements: Internaldfdeny=pd.DataFrame({'Count':Internaldf[Internaldf['Status']=='deny'][Internaldf['SrcIP']!="NA"][Internaldf['DstIP']!="NA"][Internaldf['TimeStamp']-Internaldf['TimeStamp'].iloc[0]<pd.tslib.Timedelta(minutes=30)].groupby(['DstPort','SrcIP']).size()}).reset_index().pivot_table('Count',['DstPort'],'SrcIP').fillna(0).to_sparse(fill_value=0) the warning comes out to be: /home/lubuntu/anaconda3/lib/python3.6/site

Interactive labeling of images in jupyter notebook

南楼画角 提交于 2019-12-10 10:59:57
问题 I have a list of pictures: pictures = {im1,im2,im3,im4,im5,im6} Where im1: im2: im3: im4: im5: im6: I want to assign the pictures to labels (1,2,3,4 etc.) For instance, here pictures 1 to 3 belong to label 1, picture 4 belongs to label 2, picture 5 to label 3, and picture 6 to label 4. -> label = {1,1,1,2,3,4} Since I need to see the images when I label them, I need a method to do that while labeling them. I was thinking of creating an array of images: And then I define the ranges by clicking