The python code for this.
#importing pandas to read the csv file
import pandas as pd
#importing the matplotlib.pyplot for plotting
import matplotlib.pyplot as plt
# getting the name of input file
input_file_name = input("Enter the input file name ")
# setting the name of output file
output_file_name = input("Enter the file name ")
#Reading the data in input file using pandas
data = pd.read_csv(input_file_name)
# Given that the file has FractionChildren column
child_data = data['Fraction Children']
#making the plot and stroing the plot with user defined file
name
plt.plot(data['Date of census'],child_data,label='Fraction
Children')
plt.legend()
plt.xlabel("Date of Census")
plt.show()
plt.savefig(output_file_name)
I can't show the output of the program because I don't have that input CSV file.
I hope you understand the above code and got the answer.
Thank you:):)
ask the user to specify the input file, ask the uscr to specify the output filc,...
Write a program that would ask the user to enter an input file name, and an output file name. Then the program reads the content of the input file, and read the data in each line as a number (double). These numbers represent the temperatures degrees in Fahrenheit for each day. The program should convert the temperature degrees to Celsius and then writes the numbers to the output file, with the number of day added to the beginning of the...
C++ (1) Write a program to prompt the user for an input and output file name. The program should check for errors in opening the files, and print the name of any file which has an error, and exit if an error occurs. For example, (user input shown in caps in first line, and in second case, trying to write to a folder which you may not have write authority in) Enter input filename: DOESNOTEXIST.T Error opening input file: DOESNOTEXIST.T...
Please write this in C. Write this code in Visual Studio and upload your Source.cpp file for checking (1) Write a program to prompt the user for an output file name and 2 input file names. The program should check for errors in opening the files, and print the name of any file which has an error, and exit if an error occurs opening any of the 3 For example, (user input shown in caps in first line) Enter first...
Can someone help me put the string removee the return to an outfile and fix?? prompt: CS 575 LabEx14: no e’s Let the user specify an input file and an output file (text files). Read the input file and write the output file; the output file should be the same as the input file, except that it has no e’s. For example, if the input file had the line. Streets meet in the deep. Then the output file would have...
C++ Create a function called open Output whose input is a reference to an output file stream, which asks the user to enter a file name to open for output, and then checks to see whether the file already exists, then asks whether the user wants to overwrite it. This function returns nothing. You can now use this function any time you want to open a file for output in this class.
Write a program that asks the user for the name of an image, the name of an output file. Your program should then save the upper right quarter of the image to the output file specified by the user. A sample run of your program should look like: Enter image file name: hunterLogo.png Enter output file: logOUR.png which would have as input and output: HUNTER ITER The City University of New York Hint: See sample programs from Lectures 3 and...
Ask the user for the name of a file and a word. Using the FileStats class, show how many lines the file has and how many lines contain the text. Standard Input Files in the same directory romeo-and-juliet.txt the romeo-and-juliet.txt Required Output Enter a filename\n romeo-and-juliet.txt has 5268 lines\n Enter some text\n 1137 line(s) contain "the"\n Your Program's Output Enter a filename\n romeo-and-juliet.txt has 5268 lines\n Enter some text\n 553 line(s) contain "the"\n (Your output is too short.) My...
Write a program that will first receive as input the name of an input file and an output file. It will then read in a list of names, id #s, and balances from the input file specified (call it InFile.txt) which you will create from the data provided below. The program will then prompt the user for a name to search for, when it finds the name it will output to a file (call it OFile.txt) the person’s id#, name,...
C++ please! (1) Prompt the user to enter the name of the input file. The file will contain a text on a single line. Store the text in a string. Output the string. Ex: Enter file name: input1.txt File content: We'll continue our quest in space. There will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. Nothing ends here; our hopes and our journeys continue! (2) Implement a PrintMenu() function,...