Skip to content

Instantly share code, notes, and snippets.

@deybhayden
Created February 23, 2014 04:57
Show Gist options
  • Save deybhayden/9167069 to your computer and use it in GitHub Desktop.
Save deybhayden/9167069 to your computer and use it in GitHub Desktop.
Top 10 Last Names in MLB History
# coding: utf-8
import pandas as pd
df = pd.read_csv('lahman-csv_2014-01-31/Master.csv')
count_series = df.nameLast.value_counts()
top_10_names = count_series[:10]
plt.figure()
top_10_names.plot(kind='bar').set_title('Most Popular Last Names in MLB'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment