Which of the following expression is used to add a new column 'C' to a data frame df, with three rows?Questions & Answers › Category: Programming Language › Which of the following expression is used to add a new column 'C' to a data frame df, with three rows? 0 Vote Up Vote Down Adam asked 4 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]Share this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Share on WhatsApp (Opens in new window) WhatsApp Print (Opens in new window) Print Share on LinkedIn (Opens in new window) LinkedIn Share on Pinterest (Opens in new window) Pinterest Like this:Like Loading...1 Answers 0 Vote Up Vote Down Lokesh Kumar Staff answered 4 years ago c. df[āCā] = [12, 98, 45]Share this: Share on Facebook (Opens in new window) Facebook Share on X (Opens in new window) X Share on WhatsApp (Opens in new window) WhatsApp Print (Opens in new window) Print Share on LinkedIn (Opens in new window) LinkedIn Share on Pinterest (Opens in new window) Pinterest Like this:Like Loading...