Graded = 8/8


In [55]:
#1) What books topped the Hardcover Fiction NYT best-sellers list on 
#Mother's Day in 2009 and 2010? How about Father's Day?

#Establishing the name of bestseller lists

In [56]:
import requests

In [57]:
response = requests.get('https://api.nytimes.com/svc/books/v3/lists/names.json?api-key=71621eb479f045bf8bee783b6943fdd4')
Bestseller_lists = response.json()

In [58]:
Bestseller_lists.keys()


Out[58]:
dict_keys(['status', 'num_results', 'copyright', 'results'])

In [59]:
type(Bestseller_lists['results'])


Out[59]:
list

In [60]:
bestseller = Bestseller_lists['results']
for x in bestseller:
    print(x['list_name'])


Combined Print and E-Book Fiction
Combined Print and E-Book Nonfiction
Hardcover Fiction
Hardcover Nonfiction
Trade Fiction Paperback
Mass Market Paperback
Paperback Nonfiction
E-Book Fiction
E-Book Nonfiction
Hardcover Advice
Paperback Advice
Advice How-To and Miscellaneous
Chapter Books
Childrens Middle Grade
Childrens Middle Grade E-Book
Childrens Middle Grade Hardcover
Childrens Middle Grade Paperback
Paperback Books
Picture Books
Series Books
Young Adult
Young Adult E-Book
Young Adult Hardcover
Young Adult Paperback
Hardcover Graphic Books
Paperback Graphic Books
Manga
Combined Print Fiction
Combined Print Nonfiction
Animals
Business Books
Celebrities
Crime and Punishment
Culture
Education
Espionage
Expeditions Disasters and Adventures
Fashion Manners and Customs
Food and Fitness
Games and Activities
Hardcover Business Books
Health
Humor
Indigenous Americans
Relationships
Paperback Business Books
Family
Hardcover Political Books
Race and Civil Rights
Religion Spirituality and Faith
Science
Sports
Travel

In [61]:
#Now looking at the best seller list on Mother's Day May 10 2009 and Mother's Day May 2010.

In [62]:
response = requests.get('https://api.nytimes.com/svc/books/v3/lists/2009-05-10/hardcover-fiction.json?api-key=a39223b33e0e46fd82dbddcc4972ff91')
books = response.json()

In [63]:
books.keys()


Out[63]:
dict_keys(['status', 'results', 'num_results', 'copyright', 'last_modified'])

In [64]:
type(books['results'])


Out[64]:
dict

In [65]:
print(books['results'].keys())


dict_keys(['previous_published_date', 'published_date', 'bestsellers_date', 'books', 'next_published_date', 'published_date_description', 'list_name_encoded', 'corrections', 'display_name', 'normal_list_ends_at', 'updated', 'list_name'])

In [66]:
books_details = books['results']['books']
type(books)


Out[66]:
dict

In [67]:
print("The list of books topping the bestseller's list of Hardcore Fiction on Mother's Day 2009 was:")
for title in books_details:
    print(title['title'])


The list of books topping the bestseller's list of Hardcore Fiction on Mother's Day 2009 was:
FIRST FAMILY
TEA TIME FOR THE TRADITIONALLY BUILT
LOITERING WITH INTENT
JUST TAKE MY HEART
THE PERFECT POISON
THE HOST
LOOK AGAIN
DEADLOCK
LONG LOST
TURN COAT
THE ASSOCIATE
HANDLE WITH CARE
THE HELP
THE GUERNSEY LITERARY AND POTATO PEEL PIE SOCIETY
FATALLY FLAKY
ARTHAS
A RELIABLE WIFE
BORDERLINE
ONE SECOND AFTER
BONEMAN'S DAUGHTERS

In [68]:
response = requests.get('https://api.nytimes.com/svc/books/v3/lists/2010-05-09/hardcover-fiction.json?api-key=a39223b33e0e46fd82dbddcc4972ff91')
books = response.json()

In [69]:
books_details_2010 = books['results']['books']
print("The list of books topping the bestseller's list of Hardcore Fiction on Mother's Day 2010 was:")
for title in books_details_2010:
    print(title['title'])


The list of books topping the bestseller's list of Hardcore Fiction on Mother's Day 2010 was:
DELIVER US FROM EVIL
THE HELP
THE DOUBLE COMFORT SAFARI CLUB
THIS BODY OF DEATH
LUCID INTERVALS
THE SHADOW OF YOUR SMILE
BURNING LAMP
EVERY LAST ONE
EIGHT DAYS TO LIVE
CHANGES
CAUGHT
HOUSE RULES
MATTERHORN
THE WALK
DECEPTION
BEATRICE AND VIRGIL
WRECKED
SILVER BORNE
ABRAHAM LINCOLN: VAMPIRE HUNTER
A RIVER IN THE SKY

In [70]:
#And now for father's day 2009 and 2010:

In [71]:
response = requests.get('https://api.nytimes.com/svc/books/v3/lists/2010-06-21/hardcover-fiction.json?api-key=a39223b33e0e46fd82dbddcc4972ff91')
books = response.json()

In [72]:
books_details_2009_fathers = books['results']['books']
print("The list of books topping the bestseller's list of Hardcore Fiction on fathers's Day 2009 was:")
for title in books_details_2009_fathers:
    print(title['title'])


The list of books topping the bestseller's list of Hardcore Fiction on fathers's Day 2009 was:
THE GIRL WHO KICKED THE HORNET’S NEST
THE LION
THE PASSAGE
THE HELP
THE SPY
DEAD IN THE FAMILY
61 HOURS
BULLET
STORM PREY
INNOCENT
HEART OF THE MATTER
THE BURNING WIRE
THE 9TH JUDGMENT
THE BOURNE OBJECTIVE
DEATH ECHO
BLOCKADE BILLY
DELIVER US FROM EVIL
THE PARTICULAR SADNESS OF LEMON CAKE
MATTERHORN
FEVER DREAM

In [73]:
response = requests.get('https://api.nytimes.com/svc/books/v3/lists/2010-06-20/hardcover-fiction.json?api-key=a39223b33e0e46fd82dbddcc4972ff91')
books = response.json()

In [74]:
books_details_2010_fathers = books['results']['books']
print("The list of books topping the bestseller's list of Hardcore Fiction on fathers's Day 2010 was:")
for title in books_details_2010_fathers:
    print(title['title'])


The list of books topping the bestseller's list of Hardcore Fiction on fathers's Day 2010 was:
THE GIRL WHO KICKED THE HORNET’S NEST
BULLET
THE SPY
THE HELP
DEAD IN THE FAMILY
61 HOURS
THE BURNING WIRE
STORM PREY
THE BOURNE OBJECTIVE
INNOCENT
HEART OF THE MATTER
THE 9TH JUDGMENT
BLOCKADE BILLY
ALLIES
THE RULE OF NINE
FEVER DREAM
DELIVER US FROM EVIL
MATTERHORN
THE PARTICULAR SADNESS OF LEMON CAKE
DANGEROUS

In [75]:
#2) What are all the different book categories the NYT ranked in June 6, 2009? How about June 6, 2015?

In [76]:
response = requests.get('https://api.nytimes.com/svc/books/v3/lists/overview.json?api-key=a39223b33e0e46fd82dbddcc4972ff91&published_date=2009-06-06')
categories = response.json()

In [77]:
categories.keys()


Out[77]:
dict_keys(['status', 'num_results', 'copyright', 'results'])

In [78]:
categories['results'].keys()


Out[78]:
dict_keys(['previous_published_date', 'published_date', 'bestsellers_date', 'next_published_date', 'lists', 'published_date_description'])

In [79]:
Lists = categories['results']['lists']
type(Lists)


Out[79]:
list

In [80]:
print("These were the NYTimes book categories on 6 June 2009:")
for list in Lists:
    print(list['list_name'])


These were the NYTimes book categories on 6 June 2009:
Hardcover Fiction
Hardcover Nonfiction
Trade Fiction Paperback
Mass Market Paperback
Paperback Nonfiction
Hardcover Advice
Paperback Advice
Chapter Books
Paperback Books
Picture Books
Series Books
Hardcover Graphic Books
Paperback Graphic Books
Manga

In [81]:
response = requests.get('https://api.nytimes.com/svc/books/v3/lists/overview.json?api-key=a39223b33e0e46fd82dbddcc4972ff91&published_date=2015-06-06')
categories = response.json()

In [82]:
Lists = categories['results']['lists']
print("And these were the NYTimes book categories on 6 June 2015:")
for list in Lists:
    print(list['list_name'])


And these were the NYTimes book categories on 6 June 2015:
Combined Print and E-Book Fiction
Combined Print and E-Book Nonfiction
Hardcover Fiction
Hardcover Nonfiction
Trade Fiction Paperback
Mass Market Paperback
Paperback Nonfiction
E-Book Fiction
E-Book Nonfiction
Advice How-To and Miscellaneous
Childrens Middle Grade
Picture Books
Series Books
Young Adult
Hardcover Graphic Books
Paperback Graphic Books
Manga
Animals
Business Books
Celebrities
Crime and Punishment
Culture
Education
Espionage
Expeditions Disasters and Adventures
Fashion Manners and Customs
Food and Fitness
Games and Activities
Health
Humor
Indigenous Americans
Relationships
Family
Hardcover Political Books
Race and Civil Rights
Religion Spirituality and Faith
Science
Sports
Travel

In [83]:
#3 Muammar Gaddafi's name can be transliterated many many ways. His last name is often a source of a million and one versions - Gadafi, Gaddafi, Kadafi, and Qaddafi to name a few. How many times has the New York Times referred to him by each of those names?

In [84]:
responseQaddafi = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=Qaddafi&api-key=a39223b33e0e46fd82dbddcc4972ff91')
responseKadafi = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=Kadafi&api-key=a39223b33e0e46fd82dbddcc4972ff91')
responseGaddafi = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=Gaddafi&api-key=a39223b33e0e46fd82dbddcc4972ff91')
responseGadafi = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=Gadafi&api-key=a39223b33e0e46fd82dbddcc4972ff91')
Qaddafi = responseQaddafi.json()
Kadafi = responseKadafi.json()
Gaddafi = responseGaddafi.json()
Gadafi = responseGadafi.json()

In [85]:
Qaddafi.keys()


Out[85]:
dict_keys(['status', 'response', 'copyright'])

In [86]:
type(Qaddafi['response']['meta'])


Out[86]:
dict

In [87]:
Qaddafi['response']['meta'].keys()


Out[87]:
dict_keys(['offset', 'hits', 'time'])

In [88]:
#Without adding Libya to the search

In [89]:
print("The New York Times used the Qaddafi spelling", Qaddafi['response']['meta']['hits'], "times.")
print("The New York Times used the Kadafi spelling", Kadafi['response']['meta']['hits'], "times.")
print("The New York Times used the Gaddafi spelling", Gaddafi['response']['meta']['hits'], "times.")
print("The New York Times used the Gadafi spelling", Gadafi['response']['meta']['hits'], "times.")


The New York Times used the Qaddafi spelling 7017 times.
The New York Times used the Kadafi spelling 4 times.
The New York Times used the Gaddafi spelling 1223 times.
The New York Times used the Gadafi spelling 0 times.

In [90]:
#Added Libya to the search

In [91]:
responseQaddafi = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=Qaddafi&fq=Libya&api-key=a39223b33e0e46fd82dbddcc4972ff91')
responseKadafi = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=Kadafi&fq=Libya&api-key=a39223b33e0e46fd82dbddcc4972ff91')
responseGaddafi = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=Gaddafi&fq=Libya&api-key=a39223b33e0e46fd82dbddcc4972ff91')
responseGadafi = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=Gadafi&fq=Libya&api-key=a39223b33e0e46fd82dbddcc4972ff91')
Qaddafi = responseQaddafi.json()
Kadafi = responseKadafi.json()
Gaddafi = responseGaddafi.json()
Gadafi = responseGadafi.json()

In [92]:
print("The New York Times used the Qaddafi spelling", Qaddafi['response']['meta']['hits'], "times.")
print("The New York Times used the Kadafi spelling", Kadafi['response']['meta']['hits'], "times.")
print("The New York Times used the Gaddafi spelling", Gaddafi['response']['meta']['hits'], "times.")
print("The New York Times used the Gadafi spelling", Gadafi['response']['meta']['hits'], "times.")


The New York Times used the Qaddafi spelling 5309 times.
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-92-e0b07702d244> in <module>()
      1 print("The New York Times used the Qaddafi spelling", Qaddafi['response']['meta']['hits'], "times.")
----> 2 print("The New York Times used the Kadafi spelling", Kadafi['response']['meta']['hits'], "times.")
      3 print("The New York Times used the Gaddafi spelling", Gaddafi['response']['meta']['hits'], "times.")
      4 print("The New York Times used the Gadafi spelling", Gadafi['response']['meta']['hits'], "times.")

KeyError: 'response'

In [ ]:
#4) What's the title of the first story to mention the word 'hipster' in 1995? What's the first paragraph?

In [94]:
Hipster_Hits = (Hipster['response']['meta'])

In [93]:
hipster_response = requests.get('https://api.nytimes.com/svc/search/v2/articlesearch.json?q=hipster&begin_date=19950101&end_date=19951231&sort=oldest&api-key=a39223b33e0e46fd82dbddcc4972ff91')
Hipster = hipster_response.json()

Hipster.keys()


Out[93]:
dict_keys(['status', 'response', 'copyright'])

In [95]:
Hipster_Hits = (Hipster['response']['meta'])

In [96]:
print(Hipster_Hits['hits'])


26

In [97]:
Hipster['response']['docs'][0]['headline'].keys()


Out[97]:
dict_keys(['kicker', 'main'])

In [98]:
print("The title of the first article in 1995 that mentioned Hipster was", Hipster['response']['docs'][0]['headline']['kicker'], Hipster['response']['docs'][0]['headline']['main'])


The title of the first article in 1995 that mentioned Hipster was SURFACING SOUND

In [99]:
#print(Hipster['response']['docs'])

print("This is the leading paragraph of the first article that mentioned Hipster in 1995:", Hipster['response']['docs'][0]['lead_paragraph'])


This is the leading paragraph of the first article that mentioned Hipster in 1995: Portable record players with built-in speakers, from the 1960's, are the latest points on hipster score cards. In some cases, they are the only way to listen to many of the old LP or 45-r.p.m. recordings still around but not released on cassette or CD. Usually available in white plastic or metal, they can be found in flea markets and secondhand stores. One style has the arm cast in the shape of a cobra. (Don Hogan Charles/The New York Times)

In [100]:
#5) How many times was gay marriage mentioned in the NYT between 1950-1959, 1960-1969, 1970-1978, 1980-1989, 1990-1999, 2000-2009, and 2010-present?

In [101]:
r50s = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=%22gay%20marriage%22&begin_date=19500101&end_date=19591231&api-key=a39223b33e0e46fd82dbddcc4972ff91')
r60s = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=%22gay%20marriage%22&begin_date=19600101&end_date=19691231&api-key=a39223b33e0e46fd82dbddcc4972ff91')
r70s = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=%22gay%20marriage%22&begin_date=19700101&end_date=19791231&api-key=a39223b33e0e46fd82dbddcc4972ff91')
r80s = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=%22gay%20marriage%22&begin_date=19800101&end_date=19891231&api-key=a39223b33e0e46fd82dbddcc4972ff91')
r90s = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=%22gay%20marriage%22&begin_date=19900101&end_date=19991231&api-key=a39223b33e0e46fd82dbddcc4972ff91')            
r00s = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=%22gay%20marriage%22&begin_date=20000101&end_date=20091231&api-key=a39223b33e0e46fd82dbddcc4972ff91')
r10s = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=%22gay%20marriage%22&begin_date=20100101&end_date=20160707&api-key=a39223b33e0e46fd82dbddcc4972ff91')
    
re50s = r50s.json()
re60s = r60s.json()
re70s = r70s.json()
re80s = r80s.json()
re90s = r90s.json()
re00s = r00s.json()
re10s = r10s.json()

In [102]:
print("1950 - 1959:", re50s['response']['meta']['hits'])
print("1960 - 1969:", re60s['response']['meta']['hits'])
print("1970 - 1979:", re70s['response']['meta']['hits'])
print("1980 - 1989:", re80s['response']['meta']['hits'])
print("1990 - 1999:", re90s['response']['meta']['hits'])
print("2000 - 2009:", re00s['response']['meta']['hits'])
print("2010 - 2016:", re10s['response']['meta']['hits'])


1950 - 1959: 0
1960 - 1969: 0
1970 - 1979: 0
1980 - 1989: 3
1990 - 1999: 138
2000 - 2009: 2513
2010 - 2016: 4936

In [103]:
#6) What section talks about motorcycles the most? **Tip: You'll be using facets**

In [104]:
#Searching for all the section names
motorcyle_facets = requests.get('http://api.nytimes.com/svc/search/v2/articlesearch.json?q=motorcycles&facet_field=section_name&api-key=a39223b33e0e46fd82dbddcc4972ff91')
motorcycles = motorcyle_facets.json()

motorcycles.keys()


Out[104]:
dict_keys(['status', 'response', 'copyright'])

In [105]:
motorcycles['response'].keys()


Out[105]:
dict_keys(['docs', 'meta', 'facets'])

In [106]:
type(motorcycles['response']['meta'])


Out[106]:
dict

In [107]:
print(motorcycles['response']['meta'])


{'offset': 0, 'hits': 10718, 'time': 36}

In [108]:
print(motorcycles['response']['facets'])


{'section_name': {'terms': [{'count': 1078, 'term': 'World'}, {'count': 580, 'term': 'New York and Region'}, {'count': 489, 'term': 'U.S.'}, {'count': 345, 'term': 'Automobiles'}, {'count': 333, 'term': 'Business'}]}}

In [109]:
motorcycles['response']['facets'].keys()


Out[109]:
dict_keys(['section_name'])

In [110]:
print(motorcycles['response']['facets']['section_name'])


{'terms': [{'count': 1078, 'term': 'World'}, {'count': 580, 'term': 'New York and Region'}, {'count': 489, 'term': 'U.S.'}, {'count': 345, 'term': 'Automobiles'}, {'count': 333, 'term': 'Business'}]}

In [111]:
print(motorcycles['response']['facets']['section_name']['terms'])


[{'count': 1078, 'term': 'World'}, {'count': 580, 'term': 'New York and Region'}, {'count': 489, 'term': 'U.S.'}, {'count': 345, 'term': 'Automobiles'}, {'count': 333, 'term': 'Business'}]

In [112]:
Sections_count = motorcycles['response']['facets']['section_name']['terms']

for count in Sections_count:
    print(count['term'], count['count'])


World 1078
New York and Region 580
U.S. 489
Automobiles 345
Business 333

In [113]:
#7) How many of the last 20 movies reviewed by the NYT were Critics' Picks? How about the last 40? The last 60?

In [114]:
response = requests.get('https://api.nytimes.com/svc/movies/v2/reviews/search.json?api-key=a39223b33e0e46fd82dbddcc4972ff91&publication-date=2015-01-01;2016-06-08')
movie_reviews = response.json()

movie_reviews.keys()


Out[114]:
dict_keys(['status', 'has_more', 'num_results', 'copyright', 'results'])

In [115]:
#movie_reviews = movie_reviews['results']

In [116]:
movie_reviews = movie_reviews['results']

In [117]:
critics_pick = 0
for name in movie_reviews:
    if name['critics_pick']:
        critics_pick = critics_pick + 1
        #print(name['display_title'], name['critics_pick'])
print("Out ot the first 20 movie reviews", critics_pick, "were from critics' pick.")


Out ot the first 20 movie reviews 8 were from critics' pick.

In [118]:
All_results = []
offset = [0, 20, 40]
#url = "https://api.nytimes.com/svc/movies/v2/reviews/search.json?api-key=a39223b33e0e46fd82dbddcc4972ff91&publication-date=2015-01-01;2016-06-08&offset="

for n in offset:
    url = "https://api.nytimes.com/svc/movies/v2/reviews/search.json?api-key=a39223b33e0e46fd82dbddcc4972ff91&publication-date=2015-01-01;2016-06-08&offset=" + str(n)
    movie_reviews_60 = requests.get(url)
    movie_reviews_60 = movie_reviews_60.json()
    All_results = All_results + movie_reviews_60['results']

print(len(All_results))


60

In [119]:
movie_reviews_60.keys()


Out[119]:
dict_keys(['status', 'has_more', 'num_results', 'copyright', 'results'])

In [120]:
type(movie_reviews_60['results'])


Out[120]:
list

In [121]:
critics_pick_60 = 0
for name in All_results:
    #print(name['display_title'], name['critics_pick'])
    if name['critics_pick']:
        critics_pick_60 = critics_pick_60 + 1
print("Out ot the first 60 movie reviews", critics_pick_60, "were from critics' pick.")


Out ot the first 60 movie reviews 22 were from critics' pick.

In [122]:
All_results = []
offset = [0, 20]
#url = "https://api.nytimes.com/svc/movies/v2/reviews/search.json?api-key=a39223b33e0e46fd82dbddcc4972ff91&publication-date=2015-01-01;2016-06-08&offset="

for n in offset:
    url = "https://api.nytimes.com/svc/movies/v2/reviews/search.json?api-key=a39223b33e0e46fd82dbddcc4972ff91&publication-date=2015-01-01;2016-06-08&offset=" + str(n)
    movie_reviews_40 = requests.get(url)
    movie_reviews_40 = movie_reviews_40.json()
    All_results = All_results + movie_reviews_40['results']

print(len(All_results))


40

In [123]:
critics_pick_40 = 0
for name in All_results:
    #print(name['display_title'], name['critics_pick'])
    if name['critics_pick']:
        critics_pick_40 = critics_pick_40 + 1
print("Out ot the first 40 movie reviews", critics_pick_40, "were from critics' pick.")


Out ot the first 40 movie reviews 14 were from critics' pick.

In [124]:
#8)Out of the last 40 movie reviews from the NYT, which critic has written the most reviews?

In [125]:
All_results = []
offset = [0, 20]
#url = "https://api.nytimes.com/svc/movies/v2/reviews/search.json?api-key=a39223b33e0e46fd82dbddcc4972ff91&publication-date=2015-01-01;2016-06-08&offset="

for n in offset:
    url = "https://api.nytimes.com/svc/movies/v2/reviews/search.json?api-key=a39223b33e0e46fd82dbddcc4972ff91&publication-date=2015-01-01;2016-06-08&offset=" + str(n)
    movie_reviews_60 = requests.get(url)
    movie_reviews_60 = movie_reviews_60.json()
    All_results = All_results + movie_reviews_60['results']

print(len(All_results))


40

In [126]:
#for byline in All_results:
#    print(byline['byline'])

In [127]:
byline_list = []
for by_line in All_results:
    byline_list.append(by_line['byline'])
print(byline_list)


['GLENN KENNY', 'STEPHEN HOLDEN', 'A. O. SCOTT', 'MANOHLA DARGIS', 'MANOHLA DARGIS', 'NEIL GENZLINGER', 'JEANNETTE CATSOULIS', 'KEN JAWOROWSKI', 'KEN JAWOROWSKI', 'BEN KENIGSBERG', 'ANDY WEBSTER', 'GLENN KENNY', 'JEANNETTE CATSOULIS', 'BEN KENIGSBERG', 'A. O. SCOTT', 'A. O. SCOTT', 'A. O. SCOTT', 'GLENN KENNY', 'NEIL GENZLINGER', 'ANDY WEBSTER', 'KEN JAWOROWSKI', 'ANDY WEBSTER', 'DANIEL M. GOLD', 'JEANNETTE CATSOULIS', 'HELEN T. VERONGOS', 'ANDY WEBSTER', 'KEN JAWOROWSKI', 'MANOHLA DARGIS', 'A. O. SCOTT', 'STEPHEN HOLDEN', 'NEIL GENZLINGER', 'MANOHLA DARGIS', 'BEN KENIGSBERG', 'STEPHEN HOLDEN', 'MANOHLA DARGIS', 'STEPHEN HOLDEN', 'A. O. SCOTT', 'STEPHEN HOLDEN', 'NEIL GENZLINGER', 'BEN KENIGSBERG']

In [128]:
from collections import Counter

In [129]:
counts = Counter(byline_list)

In [130]:
print("The author with the most number of counts is", counts.most_common(1))


The author with the most number of counts is [('A. O. SCOTT', 6)]

In [ ]:


In [ ]: