<jupyter_start><jupyter_text>Table of Contents1&nbsp;&nbsp;What is Pandas?2&nbsp;&nbsp;Pandas Series3&nbsp;&nbsp;Pandas DataFrame4&nbsp;&nbsp;Advantages of Pandas5&nbsp;&nbsp;Creating Series6&nbsp;&nbsp;Creating DataFrame6.1&nbsp;&nbsp;About the Author  What is Pandas?The Pandas library is built on NumPy and provides easy-to-use data structures and data analysis tools for the Python programming language.  Pandas Series A **one-dimensional** labeled array a capable of holding any data type Pandas DataFrame A **two-dimensional** labeled data structure with columns of potentially different types![Pandas](../img/pandas.png) Advantages of Pandas - Data representation- Less writing and more work done- An extensive set of features- Efficiently handles large data- Makes data flexible and customizable- Made for Python<jupyter_code># Conventional  way to import pandas 
import pandas as pd 
# Check pandas version
pd.__version__
# Show version of all packages 
pd.show_versions()<jupyter_output>INSTALLED VERSIONS
------------------
commit           : None
python           : 3.7.4.final.0
python-bits      : 64
OS               : Linux
OS-release       : 5.3.0-26-generic
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 0.25.1
numpy            : 1.17.2
pytz             : 2019.3
dateutil         : 2.8.0
pip              : 19.2.3
setuptools       : 41.4.0
Cython           : 0.29.13
pytest           : 5.2.1
hypothesis       : None
sphinx           : 2.2.0
blosc            : None
feather          : None
xlsxwriter       : 1.2.1
lxml.etree       : 4.4.1
html5lib         : 1.0.1
pymysql          : None
psycopg2         : None
jinja2           : 2.10.3
IPython          : 7.8.0
pandas_datareader: None
bs4              : 4.8.0
bottleneck       : 1.2.1
fastparquet      : None
gcsfs            : None
lxml.etree       : 4.4.1
matplotlib       : 3.1.1
numexp[...]<jupyter_text>Creating Series<jupyter_code># Create Series 
s1 = pd.Series([3, 6, 9, 12])
s1
# Check type 
type(s1)
# To see values 
s1.values
# To see index/keys 
s1.index
# Creating labeled series 
s2 = pd.Series([200000, 300000, 4000000, 500000], index=['A', 'B', 'C', 'D'])
s2
s2.values
s2.index
# Indexing
s2['A']
# Boolean indexing
s2[s2 > 700000]<jupyter_output><empty_output><jupyter_text>Creating DataFrame<jupyter_code># Create a DataFrame 
data = {'Country': ['Belgium', 'India', 'Brazil'],
        'Capital': ['Brussels', 'New Delhi', 'Brasília'],
        'Population': [11190846, 1303171035, 207847528]
}

df = pd.DataFrame(data, columns=["Country", "Capital", "Population"])
df
# Check type 
type(df)
# Indexing
df["Country"]
# or 
df.Country
# Boolean indexing 
df["Population"]  > 40000000
df["Country"] == "Belgium"
df["Capital"] == "Brasilia"<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11864406779661017, 'fraction_numerical': 0.06191629194050501, 'mean_word_length': 2.722007722007722, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '311612', 'license': 'CC0-1.0', 'n_tokens_mistral': 1099, 'n_tokens_neox': 982, 'n_words': 265, 'path': 'book/pandas/01-Introduction to Pandas.ipynb', 'repo_name': 'hossainlab/dsnotes', 'size': '2891'}