Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

there is a DataFrame of cast which contains title, year, name, character, n.. etc.

enter image description here

  1. How many leading (n=1) roles were available to actors, and how many to actresses, in each year of the 1950s?

  2. List the 10 actors/actresses that have the most leading roles (n=1) since the 1990's.

  3. List, in order by year, each of the films in which Frank Oz has played more than 1 role.

The questions above this line unfortunately I did not succeed.

I tried some functions in pandas but, no one fit to these questions

I would be delighted if someone could help


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
324 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can try using loc() method. Below link gives the complete discription https://www.geeksforgeeks.org/python-pandas-extracting-rows-using-loc/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...