image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

ted = pd.read_csv('../input/ted_main.csv')

ted.corr()

ted.sort_values('views', ascending=False).head(5)

ted.sort_values('views', ascending=True).head(5)

fig=plt.figure()
axes=fig.add_axes([0,0,1,1])
axes.set_xlabel("views")
axes.set_ylabel("comments")
axes.plot(ted["views"],ted["comments"],ls="",marker=".")

fig=plt.figure()
axes=fig.add_axes([0,0,1,1])
axes.set_xlabel("views")
axes.set_xlim(2200000)
axes.set_ylabel("comments")
axes.set_ylim(200)
axes.plot(ted["views"],ted["comments"],ls="",marker=".")

labels = ted.num_speaker.unique()
sizes = ted.num_speaker.value_counts()

fig1, ax1 = plt.subplots()
ax1.pie(sizes, labels=labels, autopct='%1.1f%%',
        shadow=True, startangle=90)
ax1.axis('equal')  # Equal aspect ratio ensures that pie is drawn as a circle.
ax1.set_title("Number of presenters")

plt.show()

ted.num_speaker.unique()
ted.num_speaker.value_counts()

ted.columns

ted.ratings[0]