What is the shape of the data frame df defined in the below-shown code? import pandas as pd data = [{‘a’: 1, ‘b’: 2}, {‘a’: 5, ‘b’: 10, ‘c’: 20}] df = pd.DataFrame(data, columns=[‘a’, ‘b’])

Questions & AnswersCategory: Programming LanguageWhat is the shape of the data frame df defined in the below-shown code? import pandas as pd data = [{‘a’: 1, ‘b’: 2}, {‘a’: 5, ‘b’: 10, ‘c’: 20}] df = pd.DataFrame(data, columns=[‘a’, ‘b’])
Adam asked 2 years ago

What is the shape of the data frame df defined in the below-shown code?

import pandas as pd

data = [{'a': 1, 'b': 2}, {'a': 5, 'b': 10, 'c': 20}]

df = pd.DataFrame(data, columns=['a', 'b'])

a. (3,)

b. (2,2)

c. Data Frame df is not created

d. (2,3)