Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 29, 2024. It is now read-only.

Commit cce392f

Browse files
Create Task2
1 parent b2ae3fa commit cce392f

File tree

1 file changed

+43
-0
lines changed
  • Naga Tejaswini Nandyala

1 file changed

+43
-0
lines changed

‎Naga Tejaswini Nandyala/Task2

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import seaborn as sns
2+
import pandas as pd
3+
import matplotlib.pyplot as plt
4+
5+
# Load the Iris dataset from Seaborn
6+
iris = sns.load_dataset("iris")
7+
numeric_iris = iris.drop(columns='species')
8+
9+
# Display the first few rows of the dataset
10+
print("First few rows of the dataset:")
11+
print(iris.head())
12+
13+
# Summary statistics
14+
print("\nSummary statistics:")
15+
print(iris.describe())
16+
17+
# Checking for missing values
18+
print("\nMissing values:")
19+
print(iris.isnull().sum())
20+
21+
# Visualizations
22+
# Pairplot
23+
sns.pairplot(iris, hue="species")
24+
plt.title("Pairplot of Iris Dataset")
25+
plt.show()
26+
27+
# Boxplot
28+
plt.figure(figsize=(10, 6))
29+
sns.boxplot(data=iris, orient="h")
30+
plt.title("Boxplot of Iris Dataset")
31+
plt.show()
32+
33+
# Histograms
34+
plt.figure(figsize=(10, 6))
35+
iris.hist()
36+
plt.suptitle("Histograms of Iris Dataset")
37+
plt.show()
38+
39+
# Correlation heatmap
40+
plt.figure(figsize=(8, 6))
41+
sns.heatmap(numeric_iris.corr(), annot=True, cmap="coolwarm")
42+
plt.title("Correlation Heatmap of Iris Dataset")
43+
plt.show()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /