3. Data with the Series
Representing Univariate Data with the Series
Configuring pandas
# import numpy and pandas
import numpy as np
import pandas as pd
# used for dates
import datetime
from datetime import datetime, date
# Set some pandas options controlling output format
pd.set_option('display.notebook_repr_html', False)
pd.set_option('display.max_columns', 8)
pd.set_option('display.max_rows', 10)
pd.set_option('display.width', 80)
# bring in matplotlib for graphics
import matplotlib.pyplot as plt
%matplotlib inlineCreating a Series using
Python lists and dictionaries
Creation using NumPy functions
Creation using a scalar value
The .index and .values properties
The size and shape of a Series
Specifying an index at creation
Heads, tails and takes
Lookup by label using the [] and .ix[] operators
Explicit position lookup with .iloc[]
Explicit label lookup with .loc[]
Slicing a Series into subsets
Alignment via index labels
Boolean selection
Reindexing a Series
Modifying a Series in-place
Last updated
Was this helpful?