r/IPython • u/NomadNella • Jun 14 '17
r/IPython • u/sandys1 • Jun 13 '17
how do I seamlessly build regular, multi-user dashboards and APIs from my notebooks ?
hi guys we do a lot of work using jupyter. especially building dashboards . we just wish there was a way to convert it into a non-kernel based dashboard/webapp so that multiple people can use it. jupyter will spawn a different kernel for every user... which is fairly inefficient for us.
I saw this - http://blog.ibmjstart.net/2016/01/28/jupyter-notebooks-as-restful-microservices/ - and it seems interesting. Is anybody building out notebooks and then using them on the web.
Another idea I had was to build out nbconvert to convert the notebook to a flask dashboard/api.
any thoughts ?
r/IPython • u/jintoku • Jun 02 '17
Running instances of a Jupyter notebook
I want to iterate over a list of files that I want analyzed with the same Jupyter script (in Python). All that change is one line, which is the input file name. So I want to essentially do
for file in file_list:
replace file_variable in jupyter script by file
run jupyter scriptIs this possible somehow?
r/IPython • u/WulfiePoo • Jun 01 '17
[Question] Using VIM & Jupyter
Context: I'd like to start using Jupyter, but I'm addicted to VIM. I'm so addicted that I don't even like the idea of having a pseudo-vim environment (https://github.com/lambdalisue/jupyter-vim-binding) in a web browser, because it's not "full VIM".
Toward this end, I've found this: https://github.com/wilywampa/vim-ipython This seems to be closer to what I want: I want to stay inside vim, but then (easily) throw my python commands/files at Jupyter to display. But this seems old-ish and designed for IPython, not Jupyter.
Questions: Are there any VIM+Jupyter users out there that have any recommendations? Is there something else out there I haven't found, or does vim-ipython still work for Jupyter... somehow?
r/IPython • u/lohrerklaus • Jun 01 '17
How to use anaconda Python within Jupyter?
Hello,
I'm trying to follow along a lecture provided as a Jupyter notebook, which I haven't used before. I need to use the Anaconda install of Python to have access to all the required modules, but I don't know how to do that in Jupyter. It only lists the default python 2. How can I make that happen? I'm using the Python 3.6 version of Anaconda 4.4.0 and the Jupyter Notebook that came along with it. OS is Ubuntu 16.04.
Thanks in advance!
r/IPython • u/NomadNella • Jun 01 '17
Release of IPython 5.4, 6.1, and rlipython
blog.jupyter.orgr/IPython • u/jabbalaci • May 24 '17
export as a normal Python session
Can we export the current session as if we had worked in the default Python shell? Here is what I mean. IPython session:
In [1]: li = [1, 2, 3]
In [2]: li
Out[2]: [1, 2, 3]
In [3]:I want to paste it in a blog post, but it's too verbose (imagine that it's longer). I'd like to export it like this:
>>> li = [1,2,3]
>>> li
[1, 2, 3]
>>>Is it possible?
r/IPython • u/CocoBashShell • May 23 '17
Kernels in Docker Containers?
Hey, has anyone experimented with using docker containers as kernels? For example, you might spin up a docker container running a python3 kernel, but within the container you have some additional software resources that you can access with Python's subprocess calls.
r/IPython • u/lwgo23gs • May 20 '17
can (or should) ipython or Jupyter console be able to edit a class?
Hello. I am using ipython3, and also trying with jupyter console and have not found a way to %edit a class that I enter in.
If I enter in something like:
class Parent(object):
def test(self):
print("testing")I do not get any errors and can call and use objects of that type. But I am not able to %edit that class. For example, I get:
/usr/local/lib/python3.6/site-packages/IPython/core/magics/code.py:503: UserWarning: The file where `<class '__main__.Parent'>` was defined cannot be read or found.
'cannot be read or found.' % data)But if I enter a function, like 'def testit():', then I can %edit testit as I would expect.
Is there something I am not entering to distinguish the class I am trying to edit?
Thanks!
r/IPython • u/shugert • May 19 '17
Jupyter Notebook: Little-Known Tricks!
blog.3blades.ior/IPython • u/roylennigan • May 13 '17
Invalid syntax when invoking package name?
I'm learning to use ipython qtconsole with scipy tools to practice graphing differential equations. I wrote a short script to set up the environment to work in. Here is the script.
When I use it in qtconsole, it gives me this error:
File "/Users/me/DiffEq/deenv.py", line 9
%matplotlib inline
^
SyntaxError: invalid syntaxHowever, when I just type "%matplotlib inline" into the console, it gives me no such error.
Why is this?
r/IPython • u/fooliam • May 11 '17
Spyder causing tons of terminal/console windows to rapidly open and close. WHy and how do I fix it?
The title pretty much says it all. This happens with a whole range of things I try to do, and actually it seems like everything I do causes this.
The only other information I can provide, is that the file address in the "Title" bar of the terminal window ends in "tput.exe", but it's opening and closing so rapidly (and so many times) that I have a hard time making out anything else. Anyone know whats up?
To clarify, I just ran x = [] and had to wait 10 seconds for a ton of terminal windows to open and close. It's SUPER annoying.
r/IPython • u/johnbjorn • May 09 '17
nbmerge: merge / concatenate Jupyter notebooks
github.comr/IPython • u/milakunis22 • May 08 '17
How to read a csv file with multiple header rows into pandas?
https://github.com/Tresanne/IS362-JUPYTERNOTEBOOK/blob/master/Impact_Poverty-%20fixed.csv
I am not sure how to read the multiple rows. Do i have to do it without the rows and then do it manually in pandas? Or is there a way to read the whole csv file into pandas?
r/IPython • u/jintoku • May 08 '17
How can I do this?
I am trying to overlay a heat map (or conditional formatting, as Excel calls it) over a dataframe displayed within the notebook in Jupyter. Is there a way to do this?
r/IPython • • May 07 '17
Hack for the Sea 2017 :: Come to Gloucester, MA and participate in our maritime hackathon!
hackforthesea.comr/IPython • u/JohannesWurst • May 06 '17
Can Jupyter (or similar) replace Excel?
I hope this question fit's here. If it's a dumb question, tell me and I'll delete it.
- I don't want to encourage a war.
- I admit, that I don't know Jupyter or Excel well!
Both programs can be used to analyze data.
As far as I know Jupyter, it's a bit like Python in the interactive mode, with some extra amenities and easy plotting of graphs. It's mostly used by scientists.
As far as I know in Excel, you have files that consist of big tables and in each cell there can either be data, computations, or some explanations like column names. You can probably also connect to dedicated data files/databases and dedicated files with code. You can also use it to make graphs. It's used in "business".
As I said: That is probably not entirely true - that's why I'm asking.
I'm a student of computer science and we learn that you should separate data, metadata, and computation and that having "locations" for data is "bad". In the sense that "goto [line]" commands are bad and pointers are bad if you want maintainability and productivity (of course pointers have their place). To me it seems like Excel makes these errors. (I know that you can give cells names, but you also have to give them a coordinate.)
Jupyter can't be used to store and edit structured data (well), I think.
…Excel is reactive/"live", which is nice – you don't have to press "run".
Is anyone of you familiar with both technologies? What are some good use cases for Excel? If Jupyter isn't it, do you know other potential replacements for Excel? Mathematica?
/edit: I found this in the Python subreddit: Python for business analytics.
Asking python vs excel in the /r/python is like asking about the benefits of having children in /r/childfree. For some balance, I'll talk about excel.
It seems like Excel is kind of like just another programming environment and the decision between Python and Excel is subtle and very subjective, like deciding between two IDEs or two programming languages.
r/IPython • u/supermanava • Apr 29 '17
How can I force a pandas table to resize to fit something I print out?
Here is the table: https://www.dropbox.com/s/2r4vb0wuc2icwp2/table2.xlsx?dl=0
Cell code: table2 = pd.read_excel('table2.xlsx') display(HTML(table2.to_html(index=False)))
When I try to print out the notebook the last two columns are cut off. Any ideas on how I can format it so that won't happen? I'm printing using chrome -> print preview. I use this method because the PDF via latex just doesn't capture a very similar PDF output.
r/IPython • u/Biffolander • Apr 28 '17
Toggle cell output scrolled not saving on random cells
I have created a pandas etc Jupyter notebook with several cells which contain very long lists or tables (up to 9600 entries), and used
pd.set_option('display.max_rows', 9600)to override the default trimming behaviour. I then set all long cells to scrolled output individually via Shift + O. All fine until I restart it; then some of the cells stay saved as scroll while others expand to their full length. Is this a bug or is there any way to save all these cells with scrolled output? I don't want to toggle all as there are some charts that become scrolled if I do this, and I don't want that.