Introduction to Pandas, page 4


Please see screenshot:

This is what it says on the left hand-side of the page:

“Note that prints the information, rather than returning it, so we can’t assign it to a variable.”

But look at my code, I did assign to a variable. Is this an error in the course content??

1 Like

No there is not any.

It getting print as you have called print is getting called internally from .info()

To confirm you can comment out your second statement

variable =
# print(variable)

This should still display information dispite second line is commented.

If you check print(variable) it should print None.

1 Like