In [1]:
from pandas import DataFrame

This is the data frame you are given

In [2]:
# Create some data
d = [[1,0],[0,0]]
d
Out[2]:
[[1, 0], [0, 0]]
In [3]:
# Create the data frame
frm = DataFrame(data=d)
frm
Out[3]:
0 1
0 1 0
1 0 0

This is the data frame you have to replicate

In [4]:
ans = [[0,1],[0,0]]
frm_ans = DataFrame(data=ans)
frm_ans
Out[4]:
0 1
0 0 1
1 0 0

Start Coding...

In [4]:
 
In [4]:
 

How check your answer?

The correct answer will have "True" on all the rows.

In [5]:
# "Yout data frame" == frm
frm == frm_ans
Out[5]:
0 1
0 False False
1 True True
Back to top