Data Table Template

This simple notebook imports tabular data, displays the first few rows, and makes a scatter plot and histogram.


In [ ]:
#importing what we'll need
import numpy as np
import pandas as pd
%matplotlib inline
import matplotlib.pyplot as plt

Import data

Creates a dataframe (called "data") and fills it with data from a URL.


In [ ]:
data = pd.read_csv("http://web_address.com/filename.csv")

Display part of the data table


In [ ]:
data.head(3)

Make a scatter plot of two column's data


In [ ]:
# Set variables for scatter plot
# 
x = data.OneColumnName
y = data.AnotherColumnName

# make the graph
plt.scatter(x,y)
plt.title('title')
plt.xlabel('label')
plt.ylabel('label')

# This actually shows the plot
plt.show()

Make a histogram of one column's data


In [ ]:
plt.hist(data.ColumnName, bins=10, range=[0,100])