CST-383 Week 2
This week, I learned to use Pandas to perform data analysis. Pandas felt very similar to using NumPy, however, the terms in Pandas can be different. In Pandas, a 1D list is considered a Series. A 2D list is called a DataFrame. One of the main differences between the two that I noticed is that you can explicitly specify the index for a Pandas Series. For example, we could specify the indexes in a Series containing names of students, with values corresponding to the student's grade. Another thing that I learned which I thought was interesting to use was aggregation in Pandas. If we wanted to calculate the mean value in a list data structure, we would likely have to iterate through the values using a for loop in other programming languages. However, in Pandas we can just use aggregate() on a Series' column and pass in a mean function, allowing us to perform this calculation in just one line. Something else that stood out to me, is that we can use groupby to get rows that share the...