Which of the following expression returns data of column B of data frame df, defined below? import pandas as pd df = pd.DataFrame({'A':[34, 78, 54], 'B':[12, 67, 43]}, index=['r1', 'r2', 'r3'])

Questions & AnswersCategory: Programming LanguageWhich of the following expression returns data of column B of data frame df, defined below? import pandas as pd df = pd.DataFrame({'A':[34, 78, 54], 'B':[12, 67, 43]}, index=['r1', 'r2', 'r3'])
Adam asked 2 years ago

Which of the following expression returns data of column B of data frame df, defined below?

import pandas as pd
df = pd.DataFrame({'A':[34, 78, 54], 'B':[12, 67, 43]}, index=['r1', 'r2', 'r3'])

a. None of the options
b. df.B
c. df[‘A’]
d. df[1]