Posts

Showing posts from September, 2026

CST-383 Week 4

CST-383 Week 3

This week, I learned to visualize variables by creating plots using Python. These plots include box plots, histograms, density plots, and scatterplots. Something I was not expecting was how easy it was to create plots in Python for data. For example, if we had a Data Frame (df) that contains a column called "age", we could simply call, df['age'].plot.hist() to create a visualization containing the frequency of the age column. Something that was a bit confusing at first for me was determining the probability of a value from a given PDF. However, it became more intuitive for me by thinking of it in terms of writing an expression using Pandas to determine the probability of getting a certain value. For example, we could create mask for a specific column then call .mean() using this mask to get a probability. Something I found interesting was how I have recently seen scatterplots being used for plotting real world data containing polling data. Before taking this course, I...

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...

CST-383 Week 1

 This week I learned how to use the library, NumPy, to perform operations on numeric data. One thing about NumPy that stood out to me, was how its operations felt similar to operator overloading in C++. For example, if we wanted to add the contents of two NumPy arrays, A and B together, we would execute the expression: A + B. In C++, the operator, "+" could be overloaded to perform the equivalent expression on our own custom array data structure. This makes me curious if the implementation of NumPy uses some kind of operator overloading to perform these operations, or if it is just specific to the Python programming language. Another thing that stood out to me while completing this week's homework, was how similar NumPy felt to writing SQL queries. If we had a NumPy array, A, containing the values 7440, 12280, 11250, 12960, 7560, 13500, 13290, 13868, and we wanted to get the values greater than 8000, we would create a mask using the expression, "mask = (A > 8000)....