Python Data Science Interview Question MCQs - Part 2
1. Train_set = np.array([1, 2, 3]) and test_set = np.array([[0, 1, 2], [1, 2, 3]]) and final resulting_set --> [[1, 2, 3], [0, 1, 2], [1, 2, 3]] then how would you join the two arrays??
2. Given two lists: a = [1,2,3,4,5] and b = [6,7,8,9] The task is to create a list which has all the elements of a and b in one dimension. Output: a = [1,2,3,4,5,6,7,8,9] Which of the following option would you choose?
3. While reading a csv file with numpy, you want to automatically fill missing values of column “Date_Of_Joining” with date “01/01/2010”. Name Age Date_Of_Joining Total_Experience Andy 20 01/02/2013 0 Mandy 30 01/05/2014 10 Sandy 10 0 Bandy 40 01/10/2009 20 Which command will be appropriate to fill missing value while reading the file with numpy?
4. You have uploaded the dataset in csv format on google spreadsheet and shared it publicly. You want to access it in python, how can you do this? Note: Library StringIO has been imported as StringIO.
5. tuple given below: tup = (1, 2, 3, 4, 5 ) Now, you want to update the value of this tuple at 2nd index to 10. Which of the following option will you choose?
6. Read a website which has url as “www.abcd.org”. Which of the following options will perform this task?
7.Which of the following is a correct implementation of mean squared error (MSE) metric?
8.Which of the following is the correct extension of the Python file ?
9. Is Python code compiled or interpreted?
10. what will be value of the python expression 6 + 3 % 5?