In Python: The Broadway dataset contains data for Broadway shows' Capacity (percentage of the theatre filled) and Gross Potential (maximum amount that can be earned) for multiple shows in a specific month and year. Given a CSV file name read from user input, write a program that performs the following tasks: Read in the CSV file as a dataframe. Insert a new column labelled "Size" at the end of the dataframe. The "Size" column contains values in column "Gross Potential" divided by 2. Output the dataframe using the print() function. Create a scatter plot of "Gross Potential" vs "Capacity" with the following marker styling parameters: markers: 'x' color: orange size: values in column "Size" Add the x-label ("Capacity", fontsize = 10), y-label ("Gross Potential", fontsize = 10), and title ("Gross Potential vs Capacity", fontsize = 16) to the figure. Add gridlines to the figure using '--' as linestyle. Save the figure as output_fig.png. Click here to view Input and Output Example
In Python: The Broadway dataset contains data for Broadway shows' Capacity (percentage of the theatre filled) and Gross Potential (maximum amount that can be earned) for multiple shows in a specific month and year. Given a CSV file name read from user input, write a program that performs the following tasks: Read in the CSV file as a dataframe. Insert a new column labelled "Size" at the end of the dataframe. The "Size" column contains values in column "Gross Potential" divided by 2. Output the dataframe using the print() function. Create a scatter plot of "Gross Potential" vs "Capacity" with the following marker styling parameters: markers: 'x' color: orange size: values in column "Size" Add the x-label ("Capacity", fontsize = 10), y-label ("Gross Potential", fontsize = 10), and title ("Gross Potential vs Capacity", fontsize = 16) to the figure. Add gridlines to the figure using '--' as linestyle. Save the figure as output_fig.png. Click here to view Input and Output Example
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images