Q. Given the two dataframes as:


In [126]: dfc1
Out[126] :
    0  1
0  2  a
1  3  b
2  4  c

In [130]: dfc2
Out[130] :
    0  1  2
0  2  a  4
2  p  q  r

Why are following statements giving errors?


(a) print(dfc1 + dfc2)

(b) print(dfc1. sub(dfc2))

(c) print(dfc1 * dfc2 )


Answer =

(a) String and number cannot be added.
(b) String and number cannot be subtracted.
(c)  String and number cannot be multiply.


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post