MACHINE LEARNING

APPLICATION OF SUPERVISED LEARNING

MACHINE LEARNINGHARD QUESTIONS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
How can we find the number of rows and columns in the data?
A
dataframe.shape()
B
dataframe.size()
C
dataframe.shape
D
dataframe.size
Explanation: 

Detailed explanation-1: -rows = df.count()[0] rows = len(df.index) rows = df.shape[0] rows = len(df.axes[0]) columns = df[df.columns[0]].count() columns = len(df.columns) columns = df.shape[1] columns = len(df.axes[1])

Detailed explanation-2: -We can get the shape of Pandas DataFrame using the shape attribute. The shape is nothing but a number of rows and columns of the DataFrame. It returns a tuple where the first element is the number of rows and the second is the number of columns.

Detailed explanation-3: -Go to options configuration in Pandas. Display all columns with: “display. max columns.” Set max column width with: “max columns.” Change the number of rows with: “max rows” and “min rows.” Set the sequence of items with: “max seq items.” 20-Dec-2022

There is 1 question to complete.