0% found this document useful (0 votes)
6 views2 pages

Python Ex 12

The document contains code snippets for analyzing the 'class' column in the Titanic dataset. It includes commands to describe the 'class' data and count the occurrences of each class. Additionally, it shows how to retrieve value counts without sorting.

Uploaded by

medini bhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Python Ex 12

The document contains code snippets for analyzing the 'class' column in the Titanic dataset. It includes commands to describe the 'class' data and count the occurrences of each class. Additionally, it shows how to retrieve value counts without sorting.

Uploaded by

medini bhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

df_titanic["class"].

describe()
class_counts = df_titanic["class"].value_counts()
class_counts

df_titanic["class"].value_counts(sort=False)

You might also like