Home »
Python »
Python Pandas MCQs
Observe the following code and identify what will be the output when we run following code | Pandas Question 4
13. Observe the following code and identify what will be the output when we run following code -
import pandas as pd
df = pd.DataFrame()
print (df)
-
Empty DataFrame
Columns: []
Index: []
-
Empty Series
Columns: [5]
Index: [0]
-
Empty DataFrame
Columns: [2]
Index: [3]
- None of the mentioned above
Answer: A)
Empty DataFrame
Columns: []
Index: []
Explanation:
In the above code, we dint pass any argument in pd.DataFrame() so it will give Empty DataFrame and null values in Columns: [] and Index: [].