如何按 Decades 制作 X 轴?

How can I make the X axis by Decades?

它的格式是csv文件

Name
Southern_Union_State_Community_College
Northwest–Shoals Community College
Central Alabama Community College
Gadsden State Community College[c]
Community College of the Air Force
Shelton State Community College[c]
Chattahoochee Valley Community College
Lurleen B. Wallace Community College
H. Councill Trenholm State Community College
Reid State Technical College
Wallace State Community College
Calhoun Community College
Coastal Alabama Community College
Enterprise State Community College
J. F. Ingram State Technical College
Jefferson State Community College
Bevill State Community College
Northeast Alabama Community College
Wallace Community College Selma
J.F. Drake State Community and Technical College
Lawson State Community College
Wallace Community College
Bishop State Community College[c]
Yale University
University of Pennsylvania
Virginia College
Faulkner University
Southern Benedictine College
Moravian College
Princeton University
Washington and Lee University
Columbia University in the City of New York
Brown University
Rutgers University
Dartmouth College
College of Charleston
Salem College
Litchfield Law School
Dickinson College
University of Alabama in Huntsville
University of Alabama at Birmingham
University of South Alabama
founded
1701
1740
1742
1746
1749
1754
1764
1766
1769
1770
1772
1773
1773
1775
1780
1781
1782
1784
1784
1784
1785
1787
1787
1787
1789
1789
1791
1791
1793
1794
1794
1794
1794
1795
1797
1798
1800
1801
1801
1802
1803
1804

使用:

df = pd.read_csv('rate.csv')
df['year'] = pd.cut(df['founded_in'].astype(int), range(1700,1811,10)).apply(lambda x:x.left)
df.groupby('year')['name'].count().plot.bar()

输出: