This is a demo for the Data + Visualization Toronto Meetup group for the Kung-Fu Pandas Meetup.
- Get VirtualBox
- Download the virtual box image from http://static.crowdriff.com/dvto/5/dvto-ipython.ova (1.3GB image)
- Import the image into virtualbox (File > Import Appliance...)
- Start the VM
- Login with username:
dataviz
, password:dataviz
- Execute the command
dvto
- Point your browser to
http://localhost:8888
- Create a new IPython Notebook
- Run the following commands:
from subprocess import call
call(["wget", "https://raw.github.com/VantageAnalytics/datavizTO/master/facebook.csv"])
import pandas as pd
dataframe = pd.read_csv('facebook.csv')
dataframe.shape
If you already have a python environment you can just install Pandas. Note that Pandas has several dependencies and installing it might require additional libraries. Particularly on Windows this can be tricky, so if you are a python novice the VirtualBox might be easier.
Once you have started python, import pandas and load the csv.
>>> import pandas as pd
>>> dataframe = pd.read_csv('facebook.csv')
The shape property gives the number of rows and columns loaded. Verify you get something like this:
>>> dataframe.shape
(511, 14)