AppLIED Stats on Data Set Flashcards

1
Q

How to know Total no. of rows nd columns in Data Set ?

A

We have to use shape attribute of data frame object .

df.shape

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to know Total no. of rows nd columns in Data Set ?

A

We have to use shape attribute of data frame object .

df.shape

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to sort Data Set by particular column ?

A

We have to use sort_value() method of Data Frame Object .

df.sort_values(‘column_name’,ascending=True)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to find minimum & maximum value of column , column contains numeric values ?

A

We have to use min() & max() method of Data Frame Object .
df[‘Age’].max()
df[‘Age’].min()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to use agg method ?

A

agg method is used for using multiple aggregate functions together on data Frame .

df.groupby(‘Embarked’)[‘Age’].agg([‘count’,’max’,’min’,’mean’])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to get to know basic information of Data Set ?

A
index
columns
shape
info()
describe()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to get column list of Data Set , & store it in variable?

A

columns=df.columns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to create a data frame , using column as row index ?

A

We have to use index_col argument of read_csv method.

df = pd.read_csv(‘dataSets/titanic.csv’,index_col=3)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly