Question: 1. Given the DataFrame object df, how would you save it to a csv file? Group of answer choices df.to_csv('file_name') df.write_csv('file_name') pd.write_csv('file_name') pd.to_csv('file_name') 2. Consider

1. Given the DataFrame object df, how would you save it to a csv file?

Group of answer choices

  • df.to_csv('file_name')
  • df.write_csv('file_name')
  • pd.write_csv('file_name')
  • pd.to_csv('file_name')

2. Consider a DataFrame df which looks like: ('Name' column had been set as Index)

Name Age Date_Of_Joining Total_Experience
Neil 22 01/02/2013 2
Ruth 30 01/04/2014 10
Sandy 10 0 0
Joshua 40 01/10/2009 20

Which command will access the record of 'Joshua'? (Choose all that apply.)

Group of answer choices

  • df.loc['Joshua',:]
  • df.iloc[3]
  • df['Joshua']
  • df.loc[3,:]

3. Consider a DataFrame, df, which looks like: ('Name' column had been set as Index)

Name Age Date_Of_Joining Total_Experience
Neil 22 01/02/2013 2
Ruth 30 01/04/2014 10
Sandy 10 0 0
Joshua 40 01/10/2009 20

Which of the following will you use to access only the Age and Date_Of_Joining of 'Sandy'? (Choose all that apply.)

Group of answer choices

  • df.loc[2,1:3]
  • df.iloc[3, 1:3]
  • df.iloc[2, :2]
  • df.loc['Sandy' , 'Age' : 'Date_Of_Joining']

4. What's the use of the Pandas get_dummies method?

  • Exchange values between two columns
  • Convert one categorical column into multiple dummy columns with value 0 or 1
  • Convert multiple dummy columns into one categorical column with variable values
  • Fills the categorical column with 0 value

5. Which method is used to show the summary statistics of a DataFrame?

Group of answer choices

  • describe()
  • head()
  • corr()
  • info()

6. The apply() function is used to apply a function along an axis of the DataFrame, essentially a Pandas way to perform iterations on columns/rows

Group of answer choices

  • TRUE
  • FALSE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!