Pandas — Intro & Series

What it is? How to use it? — #PySeries#Episode 07

J3
Jungletronics
5 min readSep 8, 2020

--

What is PANDAS?

  1. Pandas is an open-source library build on top of NumPy;
  2. Pandas allows for analysis and data cleaning and preparations;
  3. Pandas excels in performance and productivity;
  4. Pandas also has built-in visualization features;
  5. Pandas can work with data from a wide variety of sources.
Fig 1. Pandas is a fast, powerful, flexible, and easy to use open-source data analysis and manipulation tool,
built on top of the Python NumPy programming language.

Data Science topics with Pandas:

Here are the topics for our study about Pandas:

Fig 1. Numpy & Pandas Together!

The first topic will be the Series:

SERIES

We will need these four object in Python to open a Series in Pandas:

Get your Jupyter Notebook (or Google Colab) and type:

Pandas needs NumPy because it is built on top of it.

Now initialize Pandas itself like this:

Let`s get down to code; Here is our List:

And our other three separate Python Object: data, NumPy array, and a dictionary:

HOW TO CREATE A SERIES

First, we’ll need theses four Python Object:

  1. LIST
  2. DATA
  3. ARRAY and
  4. DICTIONARY

Then we pass in our DATA to the Series Method:

Or our DATA together w/ LIST (labels):

In this very order: 1º DATA then 2º INDEX: Series (DATA, INDEX)

Or finally, what’s really cool:

Pass in the DICTIONARY:

A Series can hold pretty much almost any type of data object of Python as its data points and, more interesting than that is we can pass in built-in functions like sum(), print(), and len(), etc

It can even hold references of these functions as data points :)

pd.Series(data=[sum, print, len])

We probably never actually use this, but this demonstrates the flexibility of the PANDAS Series as far as holding different object types!

(Jose Portilla — Python For Data Science course)

Arithmetic with Series

Series (DATA, INDEX)

Other Series follows:

How to Recovery the Series:

Or pass in the INDEX like this:

Arithmetic

That’s it for Pandas Series!

In the next episode let’s discuss DataFrame!

Stay tuned!

Bye, for now, o/

GitHub Repo link

Google Colab link [TODO: THE LINK FOR COLAB GOES HERE!]

Credits & References:

Jose Portilla — Python for Data Science and Machine Learning Bootcamp — Learn how to use NumPy, Pandas, Seaborn , Matplotlib , Plotly , Scikit-Learn , Machine Learning, Tensorflow , and more!

Posts Related:

00Episode#PySeries — Python — Jupiter Notebook Quick Start with VSCode — How to Set your Win10 Environment to use Jupiter Notebook

01Episode#PySeries — Python — Python 4 Engineers — Exercises! An overview of the Opportunities Offered by Python in Engineering!

02Episode#PySeries — Python — Geogebra Plus Linear Programming- We’ll Create a Geogebra program to help us with our linear programming

03Episode#PySeries — Python — Python 4 Engineers — More Exercises! — Another Round to Make Sure that Python is Really Amazing!

04Episode#PySeries — Python — Linear Regressions — The Basics — How to Understand Linear Regression Once and For All!

05Episode#PySeries — Python — NumPy Init & Python Review — A Crash Python Review & Initialization at Numpy lib.

06Episode#PySeries — Python — NumPy Arrays & Jupyter Notebook — Arithmetic Operations, Indexing & Selection, and Conditional Selection

07Episode#PySeries — Python — Pandas — Intro & Series — What it is? How to use it? (this one)

08Episode#PySeries — Python — Pandas DataFrames — The primary Pandas data structure! It is a dict-like container for Series objects

09Episode#PySeries — Python — Python 4 Engineers — Even More Exercises! — More Practicing Coding Questions in Python!

10Episode#PySeries — Python — Pandas — Hierarchical Index & Cross-section — Open your Colab notebook and here are the follow-up exercises!

11Episode#PySeries — Python — Pandas — Missing Data — Let’s Continue the Python Exercises — Filling & Dropping Missing Data

12Episode#PySeries — Python — Pandas — Group By — Grouping large amounts of data and compute operations on these groups

13Episode#PySeries — Python — Pandas — Merging, Joining & Concatenations — Facilities For Easily Combining Together Series or DataFrame

14Episode#PySeries — Python — Pandas — Pandas Dataframe Examples: Column Operations

15Episode#PySeries — Python — Python 4 Engineers — Keeping It In The Short-Term Memory — Test Yourself! Coding in Python, Again!

16Episode#PySeries — NumPy — NumPy Review, Again;) — Python Review Free Exercises

17Episode#PySeriesGenerators in Python — Python Review Free Hints

18Episode#PySeries — Pandas Review…Again;) — Python Review Free Exercise

19Episode#PySeriesMatlibPlot & Seaborn Python Libs — Reviewing theses Plotting & Statistics Packs

20Episode#PySeriesSeaborn Python Review — Reviewing theses Plotting & Statistics Packs

--

--

J3
Jungletronics

😎 Gilberto Oliveira Jr | 🖥️ Computer Engineer | 🐍 Python | 🧩 C | 💎 Rails | 🤖 AI & IoT | ✍️