1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
worty [1.4K]
2 years ago
7

Create a series called 'directors' that contains each director's name and his or her average rating. Print out the type of your

variable. Use the 'directors' series to find the average rating for Steven Spielberg. Print the value.
Computers and Technology
1 answer:
sasho [114]2 years ago
6 0

Using the computational language in python it is possible to write a code that we will use graphics to organize the names of the directors and the films they made.

<h3>Writing code in python:</h3>

<em>import pandas as pd</em>

<em>df = pd.read_csv('all_data/movie_metadata.csv')</em>

<em>print('Shape: ',df.shape)</em>

<em>df.head()</em>

<em>name = df[['director_name','imdb_score']] </em>

<em>directors = name.groupby(['director_name']).mean() </em>

<em>directors = directors.reset_index() </em>

<em>directors = directors.stack()</em>

<em>print(directors,'\n')</em>

<em>print(type(directors),'\n')</em>

<em>print(directors[directors=='Steven Spielberg'],'\n')</em>

<em>print(directors[102]['imdb_score'])</em>

<em>miyazaki = df[df['director_name'] == 'Hayao Miyazaki']['movie_title']</em>

<em>print(miyazaki)</em>

<em>pivot_agg = pd.pivot_table(df,values='imdb_score', index=['country'], columns=['director_name'],aggfunc=np.median)</em>

<em>pivot_agg</em>

<em>gladiator_duration = df[df['movie_title']=='Gladiator\xa0']['duration'] </em>

<em>gladiator_duration</em>

See more about python at brainly.com/question/18502436

#SPJ1

You might be interested in
To open the format cells dialog box with the alignment sheet active, tap or click the alignment settings ____.
Otrada [13]
<span>To open the format cells dialog box with the alignment sheet active, tap or click the alignment setting button
</span>
3 0
4 years ago
Can you plz type down a word.
ivanzaharov [21]

Answer:

ok? ok? ok? ok? ok? ok? ok? ok? ok?

5 0
3 years ago
Read 2 more answers
Which file types have .exe and .png as their extensions?
cricket20 [7]
EXE files are executable files.
PNG files are picture files like JPEG etc.
7 0
4 years ago
Create a script that asks for the student's percentage point through a prompt box. Using the following scenarios write if else s
Valentin [98]

Answer:

<h2>Following are the java script code for the above question. </h2>

Explanation:

Program :

var percentage= prompt("Enter the percentage of the student"); // take the input from the user.

if(percentage>=90)//check condition for greator than 90.

alert("your grade is \"A\"");

else if(percentage>=80) // check condition for 80 and 89.

alert("your grade is \"B\"");

else if(percentage>=70) // check condition for 70 and 79.

alert("your grade is \"C\"");

else if(percentage>=60) // check condition for 60 and 69.

alert("your grade is \"D\"");

else // check condition for less than 60.

alert("your grade is \"F\"");

Output:

  • If the user input 60, it will prints D.
  • If the user inputs 59, it will prints f.

Code Explanation:

  • The above code is in a javascript language, In which the first line is used to display the message and take the input from the user in the alert box.
  • Then the percentage is checked by the help of in if, else if and else statement and print the grade.
  • Then the grade is printed with the help of an alert box.
5 0
3 years ago
They are correct? thank you!
SashulF [63]

Answer:

YES IT IS RIGHT ANSWER

Explanation:

WELCOME :)

3 0
3 years ago
Read 2 more answers
Other questions:
  • What output is produced by the following code fragment int num = 1 max = 20 while num &lt; max?
    7·1 answer
  • Due to the shift from host-based networks to microcomputer based networks, more than _____ percent of most organizations' total
    8·1 answer
  • In excel, a cell is referred to by its cell __________, which is the coordinates of the intersection of a column and a row. answ
    14·1 answer
  • What file format is best for photo editing? Select one: a. JPG b. RAW c. DOC d. RTF
    12·2 answers
  • What operating system type uses icons to represent programs
    9·2 answers
  • As a trainer for Exempla Healthcare, Tina is faced with many challenges to properly training her new hires. There are over 40 di
    15·1 answer
  • printArray is a method that accepts one argument, an arrayof int. The method prints the contents of the array; it does not retur
    5·1 answer
  • Write a shell (text-based) program, called first_word.py, that opens the file stuff.txt and prints out the first word of every l
    14·1 answer
  • Which tool determines whether or not applications, devices, and computers will work with a new operating system, while maintaini
    13·1 answer
  • Explain the procedure you will undertake to create a new partition​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!