<jupyter_start><jupyter_text>---title: "Series Object"author: "TACT"date: 2019-04-20description: "-"type: technical_notedraft: false---<jupyter_code>The pandas series object
    the base data structure of pandas is the sereis object,which is 
    designed to operate similar to a numpy array but also add index         capablilities 
import pandas as pd
from pandas import Series
s = Series([1, 2, 3, 4]) #create a four item
s
s[[1, 3]] #return a series with the rows with labels 1 and 3
s = Series([1, 2, 3, 4],
          index = ['a', 'b', 'c', 'd']) #create a item with index
s
s[['a', 'd']]
s.index #it will show index

s.values #it will show values
dates = pd.date_range('2019-05-18', '2019-05-25')
dates
temp_chennai = Series([36, 37, 36, 37, 37, 37, 37, 37],
                     index = dates)
temp_delhi = Series([34, 39, 41, 41, 41, 41, 41, 42],
                   index = dates)
temp_chennai.mean()
temp_delhi.mean()
temp_diffs_between_chennai_and_delhi = abs(temp_delhi - temp_chennai)
temp_diffs_between_chennai_and_delhi
temp_diffs_between_chennai_and_delhi['2019-05-20']<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12645739910313902, 'fraction_numerical': 0.06816143497757847, 'mean_word_length': 3.9162995594713657, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '503109', 'license': 'MIT', 'n_tokens_mistral': 463, 'n_tokens_neox': 389, 'n_words': 127, 'path': 'docs/python/pandas/Series_object.ipynb', 'repo_name': 'mmblack4/mynotes', 'size': '1115'}