In [ ]:
import pandas as pd
import matplotlib.pyplot as plt
%pylab inline

In [ ]:
data = pd.read_csv("operating-systems.csv")
data.head()

In [ ]:
data.columns

In [ ]:
data["Value"]

In [ ]:
# This will not work! Whyyyyyy?
# data["Item"]

In [ ]:
data['Item']

In [ ]:
data.rename(columns = {'Item' : "Operating System"}, inplace=True)
data.head()

In [ ]:
os_new = data[["Operating System", "Value Percent"]]

In [ ]:
os_new.set_index("Operating System", inplace=True)
os_new.head()

In [ ]:
explode = (0.1, 0, 0, 0, 0)
colors_mine = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral', 'lightcyan']
os_new[:5].plot(kind="pie", y="Value Percent",autopct='%.2f%%', shadow=True, explode=explode, legend = False, colors = colors_mine)

In [ ]: