Python For Data Science
Python For Data Science
2. For a company “ABC”, create the daily sales values randomly for one week [3]
span. Create a dataframe having sales values, index as date and column
heading as ‘Daily Sale’. Plot a line graph for this weekly sale. Also create a
trend line over the plot to see the direction of the sale.
1
Q:2[A] Explain different forms and locations of data. [2]
2. Write a python program to read name of the file from the user and perform [4]
the following operations on it. (Read the file name "subjects.txt" from the
user)
1. Print the 75% records of the file. Read percentage from the user.
2. Print every 4th row of the file.
3. Write the output of the step 2 into the new file named subset1.txt
The contents of the subjects.txt file are as follows:
*************