I would like to list all the columns, and the number of rows in a Pandas data.frame.
For example, suppose that my data frame df looks like:
field1 field2
x x1 1
y y1 4
I would like to be able to run:
> df.columns()
['field1','field2']
> df.nrows()
2
Is that possible?
df.columnsanddf.shape[0]