AISaturdaysOgbomoso Cohort2, week2: Pandas

Lautech DataScience
3 min readDec 12, 2018

--

The classes are getting more and more exciting. On the 8th of December 2018, we had our second class for cohort2. The class we had was on pandas.

Pandas is another library in python that is useful for data analysis and visualization, it has three major structures which are:Series, DataFrame and Panel
*Series: The series data structure of pandas can only take in a single column and this can be done by passing a dictionary, list or numpy array into the ‘.Series()’ method after importing pandas.

  • DataFrame: Another structure of the pandas is DataFrame, unlike the Series data structure, it has the ability to take in more than just a single column, the exciting thing 😎 about it is that it is able to take in multiple columns which makes it more efficient in creating tables and datasets more than the series data structure. In order to be able to create a DataFrame, we imported the pandas library, called the DataFrame method and passed in our dictionaries into it.

We didn’t really get to work with the Panel structure ☹ as we got really excited 😄 working with a real life data. We were shown how to access rows and columns and how to add new rows and columns to an already existing DataFrame, we also got to play around with datasets that had missing datas and we were informed that that when given datasets containing missing values to work on, we are either to fill them using the ‘.fillna()’ method or drop them using the ‘.drop()’ method.

Another fun thing we were taught was how to remove columns and rows from the DataFrame. We also worked with a dataset in the csv format, we read the data from our computer directories using ‘.read_csv()’ under pandas and then we passed in the directory into the enclosed bracket. We thoroughly checked through our dataset for unnecessary information that pried into our dataset to disturb us 😂😂(they are called outliers), we dropped them because they were not useful.

We further used the ‘.info()’ method to make value counts of values in a specific column checking the number of times each value appeared, we also used the ‘.describe()’ method to check out the descriptive statistics of columns with numerical values.

Everyone was excited to practise and thereby assignments were given out to work on. With each passing class, we can proudly say everyone is being groomed into becoming really good Data scientists and thereby AI Engineers.

Thanks to our ambassador Oluwapelumi Adeosun for writing this and Daniel Ajisafe and Tejumade Afonja for guiding us.

AISaturdayOgbomoso wouldn’t have happened without our fellow ambassadors and coaches, our partners Intel.

follow us on twitter

--

--

Lautech DataScience

A community of data scientists and AI practitioners in LAUTECH.