Q:

write a Python program using Scikit-learn to print the keys, number of rows-columns, feature names and the description of the Iris data

0

write a Python program using Scikit-learn to print the keys, number of rows-columns, feature names and the description of the Iris data.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Python Code:

import pandas as pd
iris_data = pd.read_csv("iris.csv")
print("\nKeys of Iris dataset:")
print(iris_data.keys())
print("\nNumber of rows and columns of Iris dataset:")
print(iris_data.shape) import pandas as pd
iris_data = pd.read_csv("iris.csv")
print("\nKeys of Iris dataset:")
print(iris_data.keys())
print("\nNumber of rows and columns of Iris dataset:")
print(iris_data.shape) 

Sample Output:

Keys of Iris dataset:
Index(['Id', 'SepalLengthCm', 'SepalWidthCm', 'PetalLengthCm', 'PetalWidthCm',
       'Species'],
      dtype='object')

Number of rows and columns of Iris dataset:
(150, 6)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now