Executing but not seeing the results/ Introduction to Data Science Book Chapter 2 - Executing but not seeing the results

29 views
Skip to first unread message

Parth Bhatt

unread,
Sep 5, 2019, 10:53:13 AM9/5/19
to Project Jupyter
Hi All,
I am a new learner for Jupyter Notebook and I started with the Intro to Data Science book,
In chapter 2 I am running this code but I am unable to see any outputs after the execution of the code. 
I've no clue what's happening and why I am not seeing the results. I am running it on windows (Python 3). 

Kindly help me and suggest me any good basic tutorials or videos which can be helpful. 


import pandas as pd
import numpy as np
import matplotlib.pyplot as plt


data = {’year ’: [
2010 , 2011 , 2012 ,
2010 , 2011 , 2012 ,
2010 , 2011 , 2012
],
’team ’: [
’FCBarcelona ’, ’FCBarcelona ’,
’FCBarcelona ’, ’RMadrid ’,
’RMadrid ’, ’RMadrid ’,
’ValenciaCF ’, ’ValenciaCF ’,
’ValenciaCF ’
],
’wins ’: [30, 28, 32, 29, 32, 26, 21, 17, 19],
’draws ’: [6, 7, 4, 5, 4, 7, 8, 10, 8],
’losses ’: [2, 3, 2, 4, 2, 5, 9, 11, 11]
}
football = pd.DataFrame(data , columns = [
’year ’, ’team ’, ’wins ’, ’draws ’, ’losses ’
]
)

Paul Hobson

unread,
Sep 5, 2019, 12:20:47 PM9/5/19
to jup...@googlegroups.com
This code won't display any output. In general (there are exception) notebook will only display things called with the `print` function, jupyter's `display` module, and bare statement on the last line of the cell.

Type `print(footbool)` in another cell to see what I mean.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/9c12b435-1704-455c-9eef-5c4e78572fce%40googlegroups.com.

Parth Bhatt

unread,
Sep 5, 2019, 5:55:28 PM9/5/19
to Project Jupyter
Thanks, Paul, makes sense, that was easy!
To unsubscribe from this group and stop receiving emails from it, send an email to jup...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages