Week #2: Chapter 3

 Chapter #3: Handling and Cleaning Data with Python Libraries


    No matter what coding project your working on data handling or cleaning is important. Libraries in Python such as Pandas and NumPy help simplify your data and also be able to help manipulate the data. To use this in your. projects you can import it by using "import pandas as pd" and this should import the library into your project. Pandas have two different data structures and those are:

Series: A one-dimensional labeled array capable of holding any data type.

DataFrame: A two-dimensional labeled data structure with columns of potentially different types.

The ways to import Pandas into your project are the following:

    Import pandas as pd

    data = pd.read_csv('data.csv')

This is for a CSV file but you can do this with many different types like excel, json, sql and lastly csv.

    For NumPy or numerical python. This is in short an array it can be as complex or simple as you wish it to be. Its also useful to sort or to store large amount of data or numbers.

To import NumPy you do the following "Import numpy as np" this is all you have to do to import it and then after you create the array "array = np.array([1, 2, 3, 4, 5])" and this creates your array from there you can assign things to the array or sort it how you would want.

Python is probably the easiest coding language to start with because of how simple it is for the user. I am very familiar with python and have taken multiple classes using this coding language. This chapter does a good job at giving you a basic direction to go with and to play around with Pandas and NumPy. From there you can build off of that and use it in your project.



Comments

Popular posts from this blog

Week #2: How AI can Redefine Success in the Workplace

Week #4: Probability and Statistics for Data Science