Posts

Showing posts from May, 2026

CST 383 Week 2

Image
This is our second week in CST 383 - Introduction to Data Science. Pandas This week we discussed Pandas , which is a Python library that is built on top of NumPy and is designed for data analysis. Series  First we discussed Pandas Series, which is analogous to a list or 1D array.  Series are made up of two 1D arrays. One array contains values, and the other contains indices for the data. The two arrays for values and indices can contain different data types. To create a series we use  pd.Series , such as  x = pd.Series([.2, .4, .3, 1.0], index=['Mon', 'Tue', 'Wed', 'Thu']) . If no index is explicitly given, the Series defaults to standard indices (0-length - 1). We can also create a Series from a dictionary by passing the dictionary into  pd.Series . For example, if we had the dictionary  d={'Mon':0.2, 'Tue':0.4}  we could create a Series with  x=pd.Series(d) .  In the above example, the values  ['Mon', 'Tue', 'Wed...