Page 353 - Informatics_Practices_Fliipbook_Class12
P. 353

Ans.  (i)  sum()
                  (ii)  mean()

                  (iii)  max()
                  (iv)  min()

              46.  Determine the keyword argument that should be set in different Pandas methods to perform the following
                  operation:
                  (i)   To  indicate  that  there  is  no  header  row  comprising  column  names  in  the  CSV  file  to  be  read  in
                      pd.read_csv() method.

                  (ii)  To name columns explicitly while creating DataFrame using pd.DataFrame().

                  (iii)  To specify the list of required columns while reading csv file in Pandas DataFrame using pd.read_csv().
                  (iv)  To specify the list of irrelevant rows while reading csv file in Pandas DataFrame using pd.read_csv().

                  (v)   To specify the new data types in the form of a dictionary (column_name: data_type) while reading csv file
                      in Pandas DataFrame using pd.read_csv().
                  (vi)  To set a column as the row labels  while reading csv file in Pandas DataFrame using pd.read_csv().

                  (vii)   To modify the original dataframe while setting a column as the index using the method DataFrame.
                      set_index().
                  (viii) To apply the sum operation row-wise across columns while invoking DataFrame.min().

             Ans. (i)  header
                  (ii)  columns
                  (iii)  usecols
                  (iv)  skiprows

                  (v)  dtype
                  (vi)  index_col
                  (vii)  Inplace
                  (viii) axis

              47.  What is open data? Name any two websites from which we can download open data.
             Ans. Open

              48.  What do you understand by the size of a Series?
             Ans. Size attribute gives the number of elements present in Series.

              49.  Size attribute gives the number of elements present in Series.

             Ans. read_csv( )
              50.  Write a Python statement to store the contents of a CSV file, MANAGER.CSV into a DataFrame d1.

             Ans. d1.read_csv("MANAGER.CSV")
              51.  How are DataFrames related to Series?

             Ans. Dataframe and series both are data structures from the Pandas library.
                  Series is a one-dimensional structure whereas Dataframe is a two-dimensional structure.




                                                                                            Viva Voce Questions  339
   348   349   350   351   352   353   354   355   356   357   358