Create a Python program to load the iris data from a given csv file into a data frame and print the shape of the data, type of the data and first 3 rows

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter4: Graphic Design With Css: Creating A Graphic Design For A Genealogy website
Section4.1: Visual Overview: Backgrounds And Borders
Problem 2QC
icon
Related questions
Question

Create a Python program to load the iris data from a given csv file into a data frame and print the shape of the data, type of the data and first 3 rows

 

 

Expected Output:

 

Shape of the data:

(150, 6)

 

Data Type:

<class 'pandas.core.frame.DataFrame'>

 

First 3 rows:

   Id  SepalLengthCm     ...       PetalWidthCm      Species

0   1            5.1     ...                0.2  Iris-setosa

1   2            4.9     ...                0.2  Iris-setosa

2   3            4.7     ...                0.2  Iris-setosa

 

[3 rows x 6 columns]

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Research
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning