Can someone help me with my code, Im having a difficult time understanding
In the Machine Learning Repository (http://archive.ics.uci.edu/ml) one of their most popular databases is the Iris database. Irises come in three different species: setosa, virginica, and versicolor. Each entry in the data set has five values: sepal length, sepal width, petal length, petal width, and the species name (setosa, versicolor, and virginica). Read in the data and create a dictionary with the key as the species name and the values as the averages of each of the four characteristic values: sepal length, sepal width, petal length, petal width. That is, the size of the dictionary will be three. Write a program to create a list of setosa petal length and a list of virginica petal length. Use function correlation to find the correlation between setosa and virginica petal length. Print the correlation rounded to two digits. My code: import pandas as pd data = pd.read_csv('http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data',header=None) data.columns = ['sepal length', 'sepal width', 'petal length', 'petal width', 'class'] data.head() Output: setola petal length: [1.4, 1.4, 1.3, 1.5, 1.4, 1.7, 1.4, 1.5, 1.4, 1.5, 1.4, 1.5, 1.4, 1.5, *goes on and prints all the data for this area*] virginica petal length: [6.0, 5.1, 5.9, 5.6, 5.8, 6.6, 4.5, 6.3, 5.8, 6.1, 5.1, *goes on and prints all the data for this area*] correlation between sets and virginica petal length: 0.10