Pandas .head(), multiple tables

Hello,

how do I print 2 data “tables” header with .head(), at the same time with Pandas?

Hi @frankja13,

Are you attempting to display the heads of two tables, one after the other, with a single print statement? Try something like this, adjusting it as necessary to suit your specific needs …

print("Visits:\n{}\n\nCheckouts:\n{}".format(visits.head(5), checkouts.head(5)))

Hope it is satisfactory.

Thanks you I think I understand how it works now!

1 Like