Intro to Pandas and Numpy: Basic Exercises
Hello and welcome to Pandas-NumPy python introduction with some simple exercices. Let’s start with NumPy basics. There are basic libraries which are really important for the data manipulation. So, first is ‘NumPy’ that is nothing but numeric python and then there is ‘pandas’ and then there is ‘scipy’. So, these three are the basic libraries which are very important for you to learn and these two things are very related the NumPy and pandas they are the core structure to handle the data. So, you need to understand NumPy and pandas when you are going to deal with the data.
NumPy is nothing but provides all the libraries to deal with the linear algebra.
- NumPy, which stands for Numerical Python
- NumPy is the foundational package for mathematical computing
- Mathematical and logical operations on arrays
- Operations related to linear algebra. NumPy has inbuilt functions for linear algebra and random generation
- ndarray is the core object in NumPy Basics ndarray
- Multidimensional array
- Homogeneous collection of values
- Fast and efficient
- Support for mathematical functions
- Primary container for data exchange between python algorithms
Pandas is one of the data centric python packages that makes importing and analyzing data much easier. Pandas is build on Numpy and matplot which makes data manipulation and visualization more convinient.If you're thinking about data science as a career, then it is imperative that one of the first things you do is learn pandas. For example, say you want to explore a dataset stored in a CSV on your computer. Pandas will extract the data from that CSV into a DataFrame — a table, basically — then let you do things like:
- Calculate statistics and answer questions about the data, like What's the average, median, max, or min of each column? Does column A correlate with column B? What does the distribution of data in column C look like?
- Clean the data by doing things like removing missing values and filtering rows or columns by some criteria
- Visualize the data with help from Matplotlib. Plot bars, lines, histograms, bubbles, and more.
- Store the cleaned, transformed data back into a CSV, other file or database