#importingpandasaspd importpandasaspd #dictionaryoflists…
Question Answered step-by-step #importingpandasaspd importpandasaspd #dictionaryoflists… # importing pandas as pdimport pandas as pd# dictionary of listsdict = {‘First Score’:[100, 90, None, 95], ‘Second Score’: [30, 45, 56, None], ‘Third Score’:[None, 40, 80, 98]}# creating a dataframe from dictionarydf = pd.DataFrame(dict)Which of the following statement is used to fill all the NaN values with -1? a. df=df.fillna(-1) b. df.fillna(-1) c. df=df.fillnull(-1) d. df=df[‘First Score’].fillna(-1) Clear my choice Question 3 Not yet answeredMarked out of 1.00Flag questionQuestion text I have a Pandas DataFrame named “data_df”. Which of the following statement cannot be used to display the first 15 rows? a.data_df[:15] b. None of the other options are correct c. data_df.head(15) d. data_df.iloc[:15] e. data_df.loc[:15] Clear my choice Question 4 Not yet answeredMarked out of 1.50Flag questionQuestion text What will be the output of the following program? # importing pandas as pdimport pandas as pd# dictionary of listsdict = {‘First’:[100.0, 90.5, None, 95.1], ‘Second’: [30.3, 45.5, 56.6, None], ‘Third’:[None, 40.8, 80.8, 98.9], ‘Fourth’:[12, 50, 60, 18]} # creating a dataframe from dictionarydf = pd.DataFrame(dict) for each in df.columns: print(df[each].dtype, end=” “) print(len(each), end=” “) Answer: Question 5 Not yet answeredMarked out of 1.00Flag questionQuestion text The size of Pandas DataFrame can be changed but the data values cannot be changed. Is this statement true or false? Select one:TrueFalse Computer Science Engineering & Technology Python Programming CSD 3314 Share QuestionEmailCopy link Comments (0)


