Which of the following expression is used to add a new column 'C' to a data frame df, with three rows?

Questions & AnswersCategory: Programming LanguageWhich of the following expression is used to add a new column 'C' to a data frame df, with three rows?
Adam asked 3 years ago

Which of the following expression is used to add a new column ‘C’ to a data frame df, with three rows?
a. df.ix[‘C’] = [12, 98, 45]
b. df.loc[‘C’] = [12, 98, 45]
c. df[‘C’] = [12, 98, 45]
d. df.iloc[‘C’] = [12, 98, 45]