Pandas .head(), multiple tables


#1

Hello,

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


#2

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.


#3

Thanks you I think I understand how it works now!


#4