Introduction to Pandas, page 4

Hello,

Please see screenshot:

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

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

But look at my code, I did assign f500.info() 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 f500.info(). print is getting called internally from .info()

To confirm you can comment out your second statement

variable = f500.info()
# print(variable)

This should still display information dispite second line is commented.

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

1 Like