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)
  1. Empty DataFrame
    Columns: []
    Index: []
  2. Empty Series
    Columns: [5]
    Index: [0]
  3. Empty DataFrame
    Columns: [2]
    Index: [3]
  4. 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: [].

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.