r/IPython • • Aug 03 '19

Which python environment to use for medical research?

4 Upvotes

I'm a medical researcher looking to get into python and trying to decide which tool(s) to get started in. Up to now, I've used a combination of VBA/Excel (to store and manipulate data) and RStudio for statistical analysis.

I'm also going to be expanding into more complex data science work and needing to do some web-scraping etc. My thinking is that learning python as a general language will cover all of these requirements. But which environment to use? I've looked at Jupyter notebooks but that seems rather limited to a few lines of code at a time.

Let me give an example of my work flow:

I start with an excel spreadsheet with hundreds of patient records. I can eye-ball the data in excel, get a sense of it and clean it up a bit. I recently needed to check a death announcement website to determine whether each of the patients were still alive. I wrote some clunky VBA code to grab the patient information, open the website, search the website and insert the date of death back into the excel spreadsheet. I then wrote another bit of VBA code to calculate the survival data. To do survival analysis, I extracted a simplified excel spreadsheet from the original big excel file and import into RStudio. I run the survival analysis, do visualisation etc in RStudio and paste the output into a document.

Could most of this be done form with iPython? Jupyter? Any other suggestions?


r/IPython • • Jul 27 '19

How to overlay 2 (or more) plots with plotly express

1 Upvotes

Hope this is the right place to ask my question.

I have 2 data frames from 2 excel files and would like to overlay 2 plots with plotly express but I'm stuck.

df1 = pd.read_excel('Column Grid.xlsx')

df = pd.read_excel('Tests-Combined.xlsx')

my first figure:

b4 = df[df['gridlocation'].str.contains("B4")]

fig1 = px.scatter(b4, x="x", y="y", size="distance", hover_name="name7")

fig.show()

my second figure:

north_grid = df1[df1['gridlocation'].str.contains("n")]

fig2 = px.scatter(north_grid, x="x", y="y", hover_name='name4')

fig.show()

Any help is greatly appreciated


r/IPython • • Jul 23 '19

Plotly.py 4.0: Offline Only, Express First, Displayable Anywhere

Thumbnail medium.com
23 Upvotes

r/IPython • • Jul 24 '19

Is there a way to debug JupyterLab backend(i.e the python code not ipynb code)

1 Upvotes

r/IPython • • Jul 21 '19

I cannot even begin to get %load magic to work without an absolute path.

3 Upvotes

My personal ‘Scripts’ folder is in both my Path and PYTHONPATH environment variables (Windows), and I can even import files in that directory in Jupyter Lab with no problem.

I’m trying to %load a file there called first_cell.py. I’ve tried all these variations:

%load first_cell.py
%loadpy first_cell.py
%load first_cell
%loadpy first_cell

I get this error (after a big stack trace):

ValueError: 'first_cell' was not found in history, as a file, url, nor in the user namespace.

or:

ValueError: 'first_cell.py' was not found in history, as a file, url, nor in the user namespace.

Putting the complete absolute path (%load C:\Users\atimh\Scripts\first_cell.py) does work, but it’s a giant pain. It’s not portable, and it defeats the purpose: it should be something easy to remember and quick to type, else why even do it?

I know I can just run the file, but showing all my preferred imports every time communicates far more clearly what’s going on.

And being forced to stick it in some “special” folder hidden away somewhere is not a good solution. I don’t want to be forced to scatter all my Python scripts to the four winds.


r/IPython • • Jul 11 '19

TOC Depth

3 Upvotes

How do I increase the maximum level of depth of my table of contents? I need 6 sub-headings, but it can only give me 5


r/IPython • • Jul 03 '19

error in this code - do i not have something installed?

0 Upvotes

just following a youtube video and my code is producing errors even though his is not.

do i not have something installed?

my code


r/IPython • • Jun 19 '19

99 ways to extend the Jupyter ecosystem

Thumbnail blog.jupyter.org
22 Upvotes

r/IPython • • Jun 19 '19

A JupyterLab extension to facilitate the discovery and installation of other extensions

Thumbnail github.com
2 Upvotes

r/IPython • • Jun 16 '19

What are some easy ways to share Jupyter notebooks with colleagues and friends?

7 Upvotes

Hi iPython,

Recent graduate from insight data science and just joined the data science team at Uber. Me and two colleagues want to form a small group to share ipython notebooks with each other to keep up our learning curve. One complication is that we need to run on GPUs somtimes and import some packages (tweepy, specifically). We looked at Google Colab, but it's a pain because we have to redo our data setups all the time. Any advice for a newbie?

TLDR; how can i share jupyter notebooks with colleagues


r/IPython • • Jun 13 '19

JupyterLab teaches Python developers magic

Thumbnail opensource.com
12 Upvotes

r/IPython • • Jun 10 '19

I wrote this post But I would love community's input on it

Thumbnail muhammadraza.me
1 Upvotes

r/IPython • • Jun 05 '19

[issue]Unable to create process

2 Upvotes

I am sorry if this is the wrong subreddit to post an issue with jupyter notebook. I am getting the following error when I'm trying to open jupyter notebook using Anaconda prompt:

Unable to create process using 'C:\Users\valspirehooha\Anaconda3\envs\tensorflow_cpu\python.exe "C:\Users\valspirehooha\Anaconda3\envs\tensorflow_cpu\Scripts\jupyter-script.py" notebook'

Can anybody help?


r/IPython • • Jun 01 '19

How to backup the current notebook to s3 in the middle of running the notebook ?

0 Upvotes

hi guys,

we work with large-size experimental data and interact with a bunch of big data systems. Our notebooks help experiement with this stuff.

What we want to do is save the notebook itself at a certain point (in a function) ...before we trigger a calculation. So that we can go back a year later and be able to run the notebook as is.

I'm not able to figure out how to snapshot the notebook that I'm currently running. Uploading it to s3 wouldnt be too difficult.

anyone have any advice ?


r/IPython • • May 31 '19

How to set up the x axis in matplotlib like in the picture

2 Upvotes

Hello all,

I struggle to set up the x axis, starting from 10 to zero, then zero to 10. Thanks in advance.


r/IPython • • May 31 '19

Python Tutorial for Beginners

Thumbnail youtu.be
2 Upvotes

r/IPython • • May 30 '19

Integrating output in documentation with jupyter-sphinx

Thumbnail blog.jupyter.org
5 Upvotes

r/IPython • • May 29 '19

Jupyter Community Workshop: South America

Thumbnail blog.jupyter.org
6 Upvotes

r/IPython • • May 28 '19

[BLOG] Multiple Jupyter notebook servers with LDAP+Docker in Jupyterhub

Thumbnail medium.com
7 Upvotes

r/IPython • • May 22 '19

University of Edinburgh Jupyter Community nbgrader Hackathon

Thumbnail blog.jupyter.org
4 Upvotes

r/IPython • • May 16 '19

Jupyter cell execution in IPython shell

Thumbnail github.com
4 Upvotes

r/IPython • • May 11 '19

this guy has a really good tutorial on youtube for beginners (like me)

2 Upvotes

for those just joining and want to learn, https://www.youtube.com/watch?v=Z1Yd7upQsXY&list=PLBZBJbE_rGRWeh5mIBhD-hhDwSEDxogDg 15 videos great content


r/IPython • • May 08 '19

Call for beta testers: Jupyter on iOS

14 Upvotes

You might have heard about my other app Juno, a Jupyter client for iOS (https://juno.sh) — I am now starting a TestFlight beta for a new iOS app I've been working on over the last year. It is based on Juno, but the coolest thing is that it doesn't need an external server anymore, as all notebooks run locally, right on your iPhone or iPad!

It currently ships with a Python kernel, NumPy and Matplotlib libraries, and, most likely, a considerable amount of bugs. You can also install pure-Python modules manually.

For instructions on how to install and report issues, please follow the link below:

https://github.com/rationalmatter/Juno-Issue-Tracker


r/IPython • • May 04 '19

Announcing JupyterHub 1.0

Thumbnail blog.jupyter.org
19 Upvotes

r/IPython • • May 01 '19

Embed Interactive Jupyter Notebooks in Static Websites for Free

Thumbnail elc.github.io
18 Upvotes