Posted on 27th April 2024
The shape means a tuple which provides you with a sign of the various dimensions are there in the array. Assume you have loaded some data in some variable train and you want to check the dimensions of that file then you can do something like this
train.shape (5,6)
train.shape[0]# this will display the number of rows
2
train.shape[1]# this will display the number of columns
3
STILL GOT QUERIES?