2 Comments

Thanks Avi, but one point: COUNT(*) only returns the number of rows in a table, so it's not the full equivalent of df.shape.

For the number of columns one can use:

SELECT COUNT(*)

FROM INFORMATION_SCHEMA.COLUMNS

WHERE table_catalog = 'database_name' -- the database

AND table_name = 'table_name'

Expand full comment

Thanks for pointing that out, Nic :)

I totally missed including that. Appreciate it.

Expand full comment