DataFrame Quiz 2

Share with others

Welcome to your DataFrame Quiz 2

Name
Email
School Name
Q11. When we create DataFrame from List of Dictionaries, then dictionary keys will become _______________

Q12. When we create DataFrame from List of Dictionaries, then number of columns in DataFrame is equal to the ______________

Q13. When we create DataFrame from List of Dictionaries, then number of rows in DataFrame is equal to the ______________

Q14. In given code dataframe 'D1' has ____________ rows and ________ columns.

import pandas as pd
LoD = [{'a':10, 'b':20}, {'a':5, 'b':10, 'c':20},{'a':7, 'd':10, 'e':20}]
D1 = pd.DataFrame(LoD)

Q15. When we create DataFrame from Dictionary of List then Keys becomes the _____________

Q16. When we create DataFrame from Dictionary of List then List becomes the _____________

Q17. In given code dataframe 'D1' has ____________ rows and ________ columns.

import pandas as pd
LoD = {"Name" : ["Amit", "Anil","Ravi"], "RollNo" : [1,2,3]}
D1 = pd.DataFrame(LoD)

Q18. We can create a DataFrame using a single series. (T/F)

Q19. DataFrame created from single Series has _____________ column.

Q20. In given code dataframe 'D1' has ____________ rows and ________ columns.

import pandas as pd
S1 = pd.Series([1, 2, 3, 4], index = ['a', 'b','c','d'])
S2 = pd.Series([11, 22, 33, 44], index = ['a', 'bb','c','dd'])
D1 = pd.DataFrame([S1,S2])


Share with others

Leave a Reply

error: Content is protected !!